Results 1 to 2 of 2

Thread: Show name of pressed button

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 2007
    Posts
    35

    Show name of pressed button

    Code:
    Private Sub btn_abbr1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click, Button2.Click, Button3.Click
    msgbox(sender.ToString)
    End Sub
    In .NET it ´s working it tells me what button pressed:

    System.Windows.Forms.Button, Text: Button1
    In .NET it ´s NOT working it tells me only:

    System.Windows.Forms.Button
    Is it possible to show the name of pressed button in .NET CF ?

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Show name of pressed button

    Try Something like
    Dim btnTest as button = ctype(e,button)
    messagebox.show(btntest.name)

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

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