473,765 Members | 1,977 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Converting ToolStripMenuIt em to MenuItem

1 New Member
I need to convert ToolStripMenuIt em to MenuItem, but i cannot find any casting.

what i need to do is to get a toolstripmenuit em and add to it new DropDownItem and then somehow return the whole new toolstripmenuit em with the new dropdownitem as a menuitem, i tried to go on a foreach loop over the dropdownitems and manually add the dropdownitems to the menuitem but i cannot managed to add the events of the dropdownitems too..

if you can give me a direction how to do that it will be wonderful
Aug 11 '12 #1
0 1800

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1072
by: news.microsoft.com | last post by:
I am trying to write a menu handler to enable/disable menu selections based on user permissions. I did this in VB6 - no problem - but since I have now lost the name of the menu, I'm trying to come up with an alternate way to do this. In my database, I have an array declared as string type that holds a list of menu names (mnuFile, for example) that I pull back. I need to take the mnuFile text string from the array and convert it to type...
6
2479
by: Pascal | last post by:
I can't find the equivalent of the old MenuItem.RadioCheck property on ToolStripMenuItem. I need to allow the menu to have a subgroup of mutually exclusive choices. How am I supposed to do this now in 2.0? thanks for help http://www.scalpa.info
2
5678
by: genojoe | last post by:
I have a VB 2003 project that I have updated to 2005. I notice that MenuItem is being phased out and replaced by ToolStripMenuItem. I want to investigate the new capabilities of this new control because the existing control causes me some problems. Specifically I nothice that ToolStripMenuItem does not have a PopUp event or the OwnerDraw property. My 2003 project utilizes these elements I suspect that somewhere on the Internet (but...
3
3043
by: Henry | last post by:
I am trying to convert code that worked in a Visual Studio 2003 project to code that will work in a Vsual Studio 2005 project and need help. The following is the VS2003 code: private void mnuColorItem_Click( object sender, System.EventArgs e) {
0
1856
by: genojoe | last post by:
I have a menu structure that formats that left aligns string1 and right aligns string2. To do this, I use the OwnerDraw, Popup, DrawItem and MeasureItem properties or events of the MenuItem class. None of these exist for the ToolStripMenuItem. Can someone point me to a Web reference that explains how to emulate the functionality of these properties and events in the ToolStripMenuItem. I can't find any useful references for this task. ...
0
1941
by: Paul E Collins | last post by:
I was using the MenuItem.Index property to get the position of a menu item. For example, the topmost item on the menu has an Index of 0, the next is 1, then 2, and so on. I've switched to the MenuStrip and found that ToolStripMenuItem does not have the Index property. What is the equivalent, if any? Do I have to write a tedious loop to do it? Eq.
3
9185
by: Martijn Mulder | last post by:
My application has a standard MenuStrip on top of the window and a ContextMenuStrip that pops up when the user clicks the right mouse button. I have defined a ToolStripMenuItem that I want to appear on both the MenuStrip and the ContextMenuStrip, but any attempt to do so makes the ToolStripMenuItem silently disappear from the other menu. See this little program:
0
5058
by: kyungdongkim | last post by:
Hi, I have a dynamically generated MenuStrip following this example: http://www.codeproject.com/useritems/Dynamic_MenuStrip.asp Basically the menu strip allows users to save and load reports. The Load menu is to list all the saved reports. I need to refresh the Load menu after a new report is saved. Any help is much appreciated! Code:
1
933
by: Paulson | last post by:
Dim arr(1) As String arr(0) = "Paulson1" For Each ctrl As ToolStripMenuItem In MenuStrip.Items For Each ctrl1 As ToolStripMenuItem In ctrl.DropDownItems If arr(0) = ctrl1.Text Then ctrl1.Visible = False End If
2
3445
by: eBob.com | last post by:
I've been working on an app which has an array of RichTextBoxes. And I have a context menu for the RTBs. The context menu has two levels; the first level has two items, "Load Sample Text File" and "Insert Row >"; the "Insert Row >" item on the first level invokes, if that's the right word, a second level which has two items, "Above" and "Below". This all worked when it was a ContextMenu. But I am trying to change it to use the new menu...
0
9399
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9835
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7379
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5276
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3532
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2806
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.