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
 
Back
Top