PC Review


Reply
Thread Tools Rate Thread

How can I get the Menuitem 's name ??

 
 
Agnes
Guest
Posts: n/a
 
      27th Mar 2005
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


 
Reply With Quote
 
 
 
 
Herfried K. Wagner [MVP]
Guest
Posts: n/a
 
      27th Mar 2005
"Agnes" <(E-Mail Removed)> 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/>

 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      28th Mar 2005
Thanks Herfried,
I try to modify the Hash Table, But fail........Anyway , thanks a lot
"Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
???????:%(E-Mail Removed)...
> "Agnes" <(E-Mail Removed)> 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/>



 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      28th Mar 2005
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" <(E-Mail Removed)> 级糶秎ン穝籇:%(E-Mail Removed)...
> Thanks Herfried,
> I try to modify the Hash Table, But fail........Anyway , thanks a lot
> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
> ???????:%(E-Mail Removed)...
>> "Agnes" <(E-Mail Removed)> 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/>

>
>



 
Reply With Quote
 
Mick Doherty
Guest
Posts: n/a
 
      28th Mar 2005
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" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
> 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" <(E-Mail Removed)>
> 级糶秎ン穝籇:%(E-Mail Removed)...
>> Thanks Herfried,
>> I try to modify the Hash Table, But fail........Anyway , thanks a lot
>> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
>> ???????:%(E-Mail Removed)...
>>> "Agnes" <(E-Mail Removed)> 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/>

>>
>>

>
>



 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      29th Mar 2005
I just try your code, It seems sucesfully.
Thanks In Advance.

"Mick Doherty"
<EXCHANGE#(E-Mail Removed).[mdaudi100#ntlworld.com]> 级糶秎ン穝籇:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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" <(E-Mail Removed)> 级糶秎ン穝籇:%(E-Mail Removed)...
>>> Thanks Herfried,
>>> I try to modify the Hash Table, But fail........Anyway , thanks a lot
>>> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
>>> ???????:%(E-Mail Removed)...
>>>> "Agnes" <(E-Mail Removed)> 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/>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Agnes
Guest
Posts: n/a
 
      29th Mar 2005
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#(E-Mail Removed).[mdaudi100#ntlworld.com]> 级糶秎ン穝籇:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:%(E-Mail Removed)...
>> 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" <(E-Mail Removed)> 级糶秎ン穝籇:%(E-Mail Removed)...
>>> Thanks Herfried,
>>> I try to modify the Hash Table, But fail........Anyway , thanks a lot
>>> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
>>> ???????:%(E-Mail Removed)...
>>>> "Agnes" <(E-Mail Removed)> 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/>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Mick Doherty
Guest
Posts: n/a
 
      29th Mar 2005
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

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html


"Agnes" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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#(E-Mail Removed).[mdaudi100#ntlworld.com]>
> 级糶秎ン穝籇:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:%(E-Mail Removed)...
>>> 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" <(E-Mail Removed)>
>>> 级糶秎ン穝籇:%(E-Mail Removed)...
>>>> Thanks Herfried,
>>>> I try to modify the Hash Table, But fail........Anyway , thanks a lot
>>>> "Herfried K. Wagner [MVP]" <hirf-spam-me-(E-Mail Removed)>
>>>> ???????:%(E-Mail Removed)...
>>>>> "Agnes" <(E-Mail Removed)> 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/>
>>>>
>>>>
>>>
>>>

>>
>>

>
>



 
Reply With Quote
 
Gary Lam
Guest
Posts: n/a
 
      31st Mar 2005
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_2...em-s-name-.htm

Posted via DevelopmentNow.com Groups
http://www.developmentnow.com
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
MenuItem Finn Stampe Mikkelsen Microsoft C# .NET 2 7th Apr 2011 03:02 PM
How get the name of a MenuItem =?Utf-8?B?TlE=?= Microsoft Dot NET Framework Forms 2 28th Oct 2005 01:45 PM
Adding to an existing MenuItem's MenuItem Collection Dynamically snesbit Microsoft Dot NET Framework Forms 3 9th Mar 2005 03:08 AM
Adding to an existing MenuItem's MenuItem Collection Dynamically snesbit Microsoft VB .NET 1 9th Mar 2005 03:05 AM
menuitem name Edwin Bach Microsoft VB .NET 3 21st Nov 2003 09:43 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:30 PM.