| | |
enter key
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Dec 2002
Posts: 461
Reputation:
Solved Threads: 56
Try this:
VB.NET Syntax (Toggle Plain Text)
Private Sub TextBox1_Keydown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyDown, TextBox2.KeyDown If e.KeyCode = Keys.Tab Then If sender.Name = "TextBox1" Then TextBox2.Focus() e.Handled = True ElseIf sender.Name = "TextBox2" Then TextBox1.Focus() e.Handled = True End If End If End Sub Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress, TextBox2.KeyPress If e.KeyChar = Microsoft.VisualBasic.ChrW(Keys.Return) Then If sender.name = "TextBox1" Then TextBox2.Focus() e.Handled = True ElseIf sender.name = "TextBox2" Then TextBox1.Focus() e.Handled = True End If End If End Sub
Last edited by waynespangler; Nov 9th, 2006 at 4:17 pm.
•
•
•
•
sorry but i didn't understand ;/ ,,
what i meant is using enter key to move from one text box to another..
and how I can do it..
I'm very new to programming. .
But using enter to do the same would be frowned upon.
*Voted best profile in the world*
![]() |
Similar Threads
- Capture the Enter Key in an Edit Control (C++)
- Problem with Keyboard Event <Enter> Key (JavaScript / DHTML / AJAX)
- CAPS LOCK Key (Visual Basic 4 / 5 / 6)
- win98: had no product key now can't uninstall (Windows 95 / 98 / Me)
Other Threads in the VB.NET Forum
- Previous Thread: System Usage Administration - Internet cafe management
- Next Thread: Compare 2 Tables - Return Rows VB 2008
| Thread Tools | Search this Thread |
"crystal .net .net2005 30minutes 2008 access add application arithmetic array assignment basic binary bing box button buttons click code combobox component connectionstring convert cpu data database databasesearch datagrid datagridview design dissertation dissertations dissertationthesis dosconsolevb.net editvb.net employees excel exists file-dialog firewall folder google hardcopy image images isnumericfuntioncall login math memory mobile module ms msaccess mssqlbackend mysql navigate net networking opacity output peertopeervideostreaming picturebox1 port print printpreview problemwithinstallation project record regex reports" reuse right-to-left save savedialog serial sqldatbase storedprocedure string temp text textbox timer toolbox updown useraccounts usercontrol vb vb.net vb.netcode vb.nettoolboxvisualbasic2008sidebar vbnet view vista visual visualbasic visualbasic.net visualstudio web wpf xml







