Doing something when I press "Enter" key
-
I have a textbox, how i can handle press "Enter" key event, i wait for help from everyone. Thanks very much.
-
I have a textbox, how i can handle press "Enter" key event, i wait for help from everyone. Thanks very much.
I am a newbie Just try this Private Sub TextBox1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown If e.KeyCode = Keys.Enter Then e.Handled = True End If End Sub
-
I have a textbox, how i can handle press "Enter" key event, i wait for help from everyone. Thanks very much.
-
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = Chr(13) Then 'event End If End Sub ICQ:258-235-734
Hi, I used this: Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = Chr(13) Then 'event End If End Sub --> but it didn't work in my application is there some property of the textbox that must be true or false to use this? I can hit any other key and it works fine but when i hit enter he does not go to this procedure I use VS2005 what could i do, please help? Thanks Alwin
-
Hi, I used this: Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar = Chr(13) Then 'event End If End Sub --> but it didn't work in my application is there some property of the textbox that must be true or false to use this? I can hit any other key and it works fine but when i hit enter he does not go to this procedure I use VS2005 what could i do, please help? Thanks Alwin
-
Never mind I solved it myself! When i put off the Acceptbutton property of the form it was OK! Thanks Anyway A.
That's Right ICQ:258-235-734 MSN:msnadair@hotmail.com