Results 1 to 3 of 3

Thread: Button Help

  1. #1

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    Question Button Help

    Hey...
    Is there a way to call the button click event.

    Say i have a textbox and they press enter how can i make enter click a button.


    Code:
     Private Sub txtURL_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtURL.KeyPress
    
            If Asc(e.KeyChar()) = 13 Then I NEED TO KNOW WHAT TO DO NOW TO CLICK A BUTTON ! 
    
    
    
        End Sub

  2. #2
    Lively Member
    Join Date
    Nov 2002
    Location
    Malaysia
    Posts
    124
    VB Code:
    1. Private Sub txtURL_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles txtURL.KeyDown
    2.             If (e.KeyValue = 13) Then
    3.                 Me.Button1_Click(sender, e)
    4.             End If
    5. End Sub

  3. #3

    Thread Starter
    Addicted Member Stick's Avatar
    Join Date
    Aug 1999
    Location
    Iowa
    Posts
    152

    Talking Thanks

    Thanks alot

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