Results 1 to 2 of 2

Thread: Who're you handling?

  1. #1

    Thread Starter
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631

    Who're you handling?

    With Net, you can use the AddHandler to change the address of functions controls are callling. How would you go about getting the control you're handling though?

    Example:

    VB Code:
    1. Private Sub MeasureItem(ByVal sender As Object,  ByVal e As _
    2. System.Windows.Forms.MeasureItemEventArgs) Handles mnuOpen.MeasureItem, mnuClose.MeasureItem
    3. 'Split into 2 lines to make life easy (scrolling)
    4. End Sub

    If this code was being called for mnuOpen how would I know?
    Please rate my post.

  2. #2

    Thread Starter
    Frenzied Member Shawn N's Avatar
    Join Date
    Dec 2001
    Location
    Houston
    Posts
    1,631
    Bad habit of answering my own questions...

    For anyone that cares to know:

    Dim mnuFinder As Windows.Forms.MenuItem
    mnuFinder = sender
    Debug.WriteLine("Text - " & mnuFinder.Text())
    Please rate my post.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width