|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How can I get the Menuitem 's name ??I know how to get the Menuitem's TEXT . BUT I need to get the names , Does
anyone know how to do ?? Thanks I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" before "Agnes" <ag***@dynamictech.com.hk> schrieb: 'MenuItem' doesn't have a 'Name' property. You may want to use an extender >I know how to get the Menuitem's TEXT . BUT I need to get the names , Does >anyone know how to do ?? > Thanks > > I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" > before component which provides the 'Name' property: MenuItem Extender - add images and font support to your menu <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> If you want to lookup menu items, you can store (key, 'MenuItem') pairs in a hash table ('Hashtable'). -- M S Herfried K. Wagner M V P <URL:http://dotnet.mvps.org/> V B <URL:http://classicvb.org/petition/> Thanks Herfried,
I try to modify the Hash Table, But fail........Anyway , thanks a lot "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl...Show quoteHide quote > "Agnes" <ag***@dynamictech.com.hk> schrieb: >>I know how to get the Menuitem's TEXT . BUT I need to get the names , Does >>anyone know how to do ?? >> Thanks >> >> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >> before > > 'MenuItem' doesn't have a 'Name' property. You may want to use an > extender component which provides the 'Name' property: > > MenuItem Extender - add images and font support to your menu > <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> > > If you want to lookup menu items, you can store (key, 'MenuItem') pairs in > a hash table ('Hashtable'). > > -- > M S Herfried K. Wagner > M V P <URL:http://dotnet.mvps.org/> > V B <URL:http://classicvb.org/petition/> Dear Herfried,
Does there is anyway to convert c# into vb.net ?? I try to modify the code, but really fail to understand the c# Thanks Show quoteHide quote "Agnes" <ag***@dynamictech.com.hk> ¼¶¼g©ó¶l¥ó·s»D:%233lPQY0MFHA.1***@TK2MSFTNGP10.phx.gbl... > Thanks Herfried, > I try to modify the Hash Table, But fail........Anyway , thanks a lot > "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> > ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl... >> "Agnes" <ag***@dynamictech.com.hk> schrieb: >>>I know how to get the Menuitem's TEXT . BUT I need to get the names , >>>Does anyone know how to do ?? >>> Thanks >>> >>> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >>> before >> >> 'MenuItem' doesn't have a 'Name' property. You may want to use an >> extender component which provides the 'Name' property: >> >> MenuItem Extender - add images and font support to your menu >> <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> >> >> If you want to lookup menu items, you can store (key, 'MenuItem') pairs >> in a hash table ('Hashtable'). >> >> -- >> M S Herfried K. Wagner >> M V P <URL:http://dotnet.mvps.org/> >> V B <URL:http://classicvb.org/petition/> > > There's a MenuExtender example on my site that adds a Tag and RadioGroup
property to menuitems. You will find source in both VB and C# http://dotnetrix.co.uk/menus.html Show quoteHide quote "Agnes" <ag***@dynamictech.com.hk> wrote in message news:%23Yvqc30MFHA.436@TK2MSFTNGP09.phx.gbl... > Dear Herfried, > Does there is anyway to convert c# into vb.net ?? I try to modify the > code, but really fail to understand the c# > Thanks > "Agnes" <ag***@dynamictech.com.hk> > ¼¶¼g©ó¶l¥ó·s»D:%233lPQY0MFHA.1***@TK2MSFTNGP10.phx.gbl... >> Thanks Herfried, >> I try to modify the Hash Table, But fail........Anyway , thanks a lot >> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> >> ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl... >>> "Agnes" <ag***@dynamictech.com.hk> schrieb: >>>>I know how to get the Menuitem's TEXT . BUT I need to get the names , >>>>Does anyone know how to do ?? >>>> Thanks >>>> >>>> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >>>> before >>> >>> 'MenuItem' doesn't have a 'Name' property. You may want to use an >>> extender component which provides the 'Name' property: >>> >>> MenuItem Extender - add images and font support to your menu >>> <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> >>> >>> If you want to lookup menu items, you can store (key, 'MenuItem') pairs >>> in a hash table ('Hashtable'). >>> >>> -- >>> M S Herfried K. Wagner >>> M V P <URL:http://dotnet.mvps.org/> >>> V B <URL:http://classicvb.org/petition/> >> >> > > I just try your code, It seems sucesfully.
Thanks In Advance. "Mick Doherty" <EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> ¼¶¼g©ó¶l¥ó·s»D:OXQJfS5MFHA.3***@TK2MSFTNGP15.phx.gbl... Show quoteHide quote > There's a MenuExtender example on my site that adds a Tag and RadioGroup > property to menuitems. > You will find source in both VB and C# > http://dotnetrix.co.uk/menus.html > > -- > Mick Doherty > http://dotnetrix.co.uk/nothing.html > > > "Agnes" <ag***@dynamictech.com.hk> wrote in message > news:%23Yvqc30MFHA.436@TK2MSFTNGP09.phx.gbl... >> Dear Herfried, >> Does there is anyway to convert c# into vb.net ?? I try to modify the >> code, but really fail to understand the c# >> Thanks >> "Agnes" <ag***@dynamictech.com.hk> ¼¶¼g©ó¶l¥ó·s»D:%233lPQY0MFHA.1***@TK2MSFTNGP10.phx.gbl... >>> Thanks Herfried, >>> I try to modify the Hash Table, But fail........Anyway , thanks a lot >>> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> >>> ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl... >>>> "Agnes" <ag***@dynamictech.com.hk> schrieb: >>>>>I know how to get the Menuitem's TEXT . BUT I need to get the names , >>>>>Does anyone know how to do ?? >>>>> Thanks >>>>> >>>>> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >>>>> before >>>> >>>> 'MenuItem' doesn't have a 'Name' property. You may want to use an >>>> extender component which provides the 'Name' property: >>>> >>>> MenuItem Extender - add images and font support to your menu >>>> <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> >>>> >>>> If you want to lookup menu items, you can store (key, 'MenuItem') pairs >>>> in a hash table ('Hashtable'). >>>> >>>> -- >>>> M S Herfried K. Wagner >>>> M V P <URL:http://dotnet.mvps.org/> >>>> V B <URL:http://classicvb.org/petition/> >>> >>> >> >> > > Dear Mick
Thanks for your coding, I can add it to my mainmnenu. However, I don't know how to retreive the property (Tag) For Each FileMenuItem As MenuItem In Me.Menu.MenuItems FileMenuItem.Tag <-- there is still no such property ???? next "Mick Doherty" <EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> ¼¶¼g©ó¶l¥ó·s»D:OXQJfS5MFHA.3***@TK2MSFTNGP15.phx.gbl... Show quoteHide quote > There's a MenuExtender example on my site that adds a Tag and RadioGroup > property to menuitems. > You will find source in both VB and C# > http://dotnetrix.co.uk/menus.html > > -- > Mick Doherty > http://dotnetrix.co.uk/nothing.html > > > "Agnes" <ag***@dynamictech.com.hk> wrote in message > news:%23Yvqc30MFHA.436@TK2MSFTNGP09.phx.gbl... >> Dear Herfried, >> Does there is anyway to convert c# into vb.net ?? I try to modify the >> code, but really fail to understand the c# >> Thanks >> "Agnes" <ag***@dynamictech.com.hk> ¼¶¼g©ó¶l¥ó·s»D:%233lPQY0MFHA.1***@TK2MSFTNGP10.phx.gbl... >>> Thanks Herfried, >>> I try to modify the Hash Table, But fail........Anyway , thanks a lot >>> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> >>> ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl... >>>> "Agnes" <ag***@dynamictech.com.hk> schrieb: >>>>>I know how to get the Menuitem's TEXT . BUT I need to get the names , >>>>>Does anyone know how to do ?? >>>>> Thanks >>>>> >>>>> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >>>>> before >>>> >>>> 'MenuItem' doesn't have a 'Name' property. You may want to use an >>>> extender component which provides the 'Name' property: >>>> >>>> MenuItem Extender - add images and font support to your menu >>>> <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> >>>> >>>> If you want to lookup menu items, you can store (key, 'MenuItem') pairs >>>> in a hash table ('Hashtable'). >>>> >>>> -- >>>> M S Herfried K. Wagner >>>> M V P <URL:http://dotnet.mvps.org/> >>>> V B <URL:http://classicvb.org/petition/> >>> >>> >> >> > > You access the tag property in the same way as you access a ToolTip
property: For Each FileMenuItem As MenuItem In Me.Menu.MenuItems If Not MenuExtender1.GetTag(FileMenuItem) Is Nothing Then MessageBox.Show(MenuExtender1.GetTag(FileMenuItem).ToString) End If Next Show quoteHide quote "Agnes" <ag***@dynamictech.com.hk> wrote in message news:Of4gB2ANFHA.1732@TK2MSFTNGP14.phx.gbl... > Dear Mick > Thanks for your coding, I can add it to my mainmnenu. However, I don't > know how to retreive the property (Tag) > For Each FileMenuItem As MenuItem In Me.Menu.MenuItems > FileMenuItem.Tag <-- there is still no such property ???? > next > "Mick Doherty" > <EXCHANGE#WITH@AND.REMOVE.SQUAREBRACKETS.[mdaudi100#ntlworld.com]> > ¼¶¼g©ó¶l¥ó·s»D:OXQJfS5MFHA.3***@TK2MSFTNGP15.phx.gbl... >> There's a MenuExtender example on my site that adds a Tag and RadioGroup >> property to menuitems. >> You will find source in both VB and C# >> http://dotnetrix.co.uk/menus.html >> >> -- >> Mick Doherty >> http://dotnetrix.co.uk/nothing.html >> >> >> "Agnes" <ag***@dynamictech.com.hk> wrote in message >> news:%23Yvqc30MFHA.436@TK2MSFTNGP09.phx.gbl... >>> Dear Herfried, >>> Does there is anyway to convert c# into vb.net ?? I try to modify the >>> code, but really fail to understand the c# >>> Thanks >>> "Agnes" <ag***@dynamictech.com.hk> >>> ¼¶¼g©ó¶l¥ó·s»D:%233lPQY0MFHA.1***@TK2MSFTNGP10.phx.gbl... >>>> Thanks Herfried, >>>> I try to modify the Hash Table, But fail........Anyway , thanks a lot >>>> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> >>>> ???????:%23eykwquMFHA.2***@TK2MSFTNGP12.phx.gbl... >>>>> "Agnes" <ag***@dynamictech.com.hk> schrieb: >>>>>>I know how to get the Menuitem's TEXT . BUT I need to get the names , >>>>>>Does anyone know how to do ?? >>>>>> Thanks >>>>>> >>>>>> I try That " For Each FileMenuItem As MenuItem In Me.Menu.menuitem" >>>>>> before >>>>> >>>>> 'MenuItem' doesn't have a 'Name' property. You may want to use an >>>>> extender component which provides the 'Name' property: >>>>> >>>>> MenuItem Extender - add images and font support to your menu >>>>> <URL:http://www.codeproject.com/cs/menu/MenuExtender.asp> >>>>> >>>>> If you want to lookup menu items, you can store (key, 'MenuItem') >>>>> pairs in a hash table ('Hashtable'). >>>>> >>>>> -- >>>>> M S Herfried K. Wagner >>>>> M V P <URL:http://dotnet.mvps.org/> >>>>> V B <URL:http://classicvb.org/petition/> >>>> >>>> >>> >>> >> >> > > There is a programme called reflector. which can convert any DLL to either C# or VB
Now you can view the methods with different languages ^_^ http://www.aisto.com/roeder/dotnet/ From http://www.developmentnow.com/g/38_2005_3_0_0_371002/How-can-I-get-the-Menuitem-s-name-.htm Posted via DevelopmentNow.com Groups http://www.developmentnow.com
Timer1_Elapsed problem.
Locate MessageBox over Window Error with Custom Control ListViewImageList keeps bitmap locked after disposing what if the database connection isn't close sqlreader Do...while problem Friend WithEvents MaskedEdit Control Upload file programmatically DataGrid OnPaint/? -How Do I Draw A GDI Type Circle On Top Of A DataGrid |
|||||||||||||||||||||||