mainMenu click

  • Thread starter Thread starter ucasesoftware
  • Start date Start date
U

ucasesoftware

Hi i create some mainItem with code with this method :
AddHandler menuItem.Click, essai_Click

As the menuItem is add with code... with a dataReader from a dataBase
like :
Name1
Name2
Name3

i need to know what name is click in my method !!!

How i can know what index or what text is click in my menuItem ????

Thx a lot
 
Usecase.

Probably three hours ago I would have given you another answer. However
thanks to Herfried who showed this for a button.

\\\
Dim SourceControl As MenuItem = DirectCast(sender, MenuItem)
Select Case True
Case SourceControl Is Me.MenuItem1
'do whatever
Case SourceControl Is Me.MenuItem2
'do something else
End Select
///
I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

MenuItem and click Event!!! 6
Namespace syntax question 2
Determining which Menu Item is Clicked 1
Insert Rows 1
Inherits MainMenu 1
How to merge to coloums 1
Shortcut Key VS2005 1
Menuitems do not display 3

Back
Top