mainMenu click

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • ucasesoftware@hotmail.fr

    #1

    mainMenu click

    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]

    #2
    Re: mainMenu click

    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(send er, 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


    Comment

    Working...