wel, i'm trying to achieve, that items added to the menuStrip, are the items from my class and not the standart System.Windows.Forms.ToolStripMenuItem().
without anyneed to manualy moding the form1.designer.cs
this.ToolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem1 = new OwnerDraw_Test_3.cToolStripMenuItem();
Well, you are deriving your own class from MenuStrip, so you are in control of what happens in there. All you have to do is override any methods/events where a MenuItem is added/inserted/deleted. That is a lot of work, though.
Alternatively you can just create your own OwnerDraw_Test_3.cToolStripMenuItem(), as you are doing. What else you need to do will depend on whether you are only going to add them in code, or if you need design time support.
For design time support, look up the documentation for the ToolStripItemDesignerAvailability attribute. From there you should find links that will help you in designing the cToolStripMenuItem.
For code only implementation, it is surely only a matter of casting to cToolStripMenuItem wherever there is interaction with your control.
Sorry not to be more help, but my internet connection is playing up, and it takes about 5 mins to get a google search up at the moment, otherwise I would have given you more specific links.
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
am working with .net 3.5,am developed one web service now i want to access that web service by using c# windows application,but there is no add web reference option in context menu when i am right clicking on root node of the application(windows application)..please..
help me...any idea to get that option..
I have a WinForms app. I have various DataGridViews throughout my app in which I use a combobox column. One in particular will only display the display member when that column has focus EVEN THOUGH I have set the DisplayStyleForCurrentCellOnly property to false. Has anyone encountered this and, more importantly, solved it?
I finally discovered what was causing the error. In the DataTable definition for the column in which the combobox was not being displayed, the datatype was defined as Int16. I changed it to Int32 and it works swimmingly.
Why would you want to do that? you can't make your form go above task manager form. You can disable such ability for system user accounts, not from code thou (well I don't know how to do from code at least)
If you want the users to not be able to exit a question form then you can hide the ControlBox (buttons with [X] in) - but really, what kind for application does not let the user exit?
Life goes very fast. Tomorrow, today is already yesterday.
I have a feeling that if you make the Window fullscreen and "always on top", then it will (almost) accomplish what you want. However the user will still be able to get to the taskbar using the Windows key. Remember if you disable everything but your app, and then the app gets into a loop or hangs, the user's only option is restart. Not a good scenario; do that a few times and they'll never use your software again.
hi, i'm trying to code a Adobe Cs4 lookalike menustrip.
i found some material on microsoft's MSDN.
i stripted this example to a proper visual studio 2008 project.
if i apply the ...
this.MenuStrip1.Renderer = new RolloverItemRenderer();
it does remove the border when you hover the the mouse over a parent menuItem and simply gives a blue background and white chars.
i would like to override the hoover color + border and shape of the button.
also this methode is hard to use, it would be cool if you can edit the custom draw menu from the designer and the need of event.
so i think it need a totaloverhaul somehow.
i have experience on other control, like tabcontrol, button, etc, etc.
but it seems, this needs a diffferent aproach.
any volunteers to code a cool costum menu?
i can mail the project.
The BrowsableAttribute is supposed to do it but it hardly ever works so I end up either using templates instead of auto binding or manually assigning each bound column. You also have the option of creating a wrapper class which is fugly but workable.
Looking for another push in the right direction here.
I'm trying to create a class that involves other collection, like the Treeview has Treenodes, which have treenodes, which have treenodes, etc...
I have a Treeview that holds Teams, then Processors assigned to those teams, and then Tasks assigned to those Processors. I need to fill an excel spreadsheet based on these assignments. I'd like to create instance of a class based on each parent node in the treeview (where level == 0), where I can say 'foreach (Processor proc in Teams), create headers in excel, and then for each 'Alpha alpha in Processors', create subheaders underneath the Processors. The key is to, I guess, I have each team created at a time, onto the assigned Team Tab in Excel.
I've got classes created, but I'm afraid I've only got it set up where I can create a Team.Processors, and a Processors.Alpha, but not a Team.Processors.Alphas... Honestly, I'm not sure if I'm even headed in the right direction.
Any ideas or detailed articles on this? All help is appreciated!