Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

mainMenu click

44 views
Skip to first unread message

ucases...@hotmail.fr

unread,
Sep 9, 2005, 9:13:28 AM9/9/05
to
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

Cor Ligthert [MVP]

unread,
Sep 9, 2005, 9:28:52 AM9/9/05
to
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


0 new messages