Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting the clicked object on a context menu
Message
From
25/08/2005 12:59:30
 
 
To
25/08/2005 05:48:50
General information
Forum:
ASP.NET
Category:
Menus
Environment versions
Environment:
VB.NET 1.1
OS:
Windows XP
Miscellaneous
Thread ID:
01043684
Message ID:
01043968
Views:
25
Omar,

I think, if I understand correctly what you're trying to do, that you should be putting the processing of the selected names in the menu handler, not trying to do it after you show the menu. So, something like this:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        cm.Show(TextBox1, New Point(0, 0))
    End Sub

    Private Sub mnuHandler(ByVal sender As Object, ByVal e As System.EventArgs)
        selected = CType(sender, MenuItem).Text
        me.ProcessSelected(selected)
    End Sub

    Private Sub ProcessSelected(string select)
        ' code here to process the menu selection 
    End Sub
~~Bonnie
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform