|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Onkeypress
Hi all,
How do i make it so my "Text1" box executes code when someone presses return or enter?? Thanks alot!! |
|
#2
|
|||
|
|||
|
Take a look at the various keyboard events available to your textbox, they are all fully documented in the VB online help.
__________________
====== Doug G ====== I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain |
|
#3
|
|||
|
|||
|
If I understood you correctly, something like the following should suit your needs. (Using VB6)
Code:
Private Sub Text1_KeyPress(KeyAscii As Integer) Select Case KeyAscii Case CInt(Asc(vbCrLf)) MsgBox "Enter key was pressed!" Case Else MsgBox "Another key was pressed!" End Select End Sub Hope that helps, -Alias |
![]() |
| Viewing: ASP Free Forums > Programming > Visual Basic Programming > Onkeypress |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|