mas7004 Posted February 27, 2004 Posted February 27, 2004 Hi, I am building a context menu in run time. I need to figure out what specific menu item has been clicked. There is no menuItem.Clicked = True I would love to just go: If menuItem1.clicked = true then : : : : end if But since there is no Menu Item property like that I am stuck. I used addHandler when I create the Menu Items. It looks as such: AddHandler menuItem.Click, AddressOf ItemsClick Thus I am using the item click method which only has two arguments: (sender As Object, e As System.EeventArgs) I would love to be able write: Private Sub ItemsClick(ByVal sender As Object, ByVal e As System.EventAgrs) debug.writeline("THE CURRENT MENU ITEM CLICKED IS: " & ________ End Sub I need some help on the '_______________' part. How do I get the current menu item that is selected when menu item can be anything from menuItem_1.......menuItem_N? Thanks, Matt Thanks, Matt Quote
*Experts* Bucky Posted February 27, 2004 *Experts* Posted February 27, 2004 What a coincidence! Someone on our sister forum, with the same name as you, posted the exact same thing! And the solution was the same, too! ;) Anyway, check it out: http://www.visualbasicforum.com/showthread.php?threadid=148485 Please limit your posts to either one of the forums. If you're going to use VB.NET from now on, you might as well stay here. Quote "Being grown up isn't half as fun as growing up These are the best days of our lives" -The Ataris, In This Diary
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.