|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi,
I am new to VB6. I have a search button and i wrote code on Click event. now i want my search button to be activated when we press Enter in our Keyboard. So how can i assign two Events for one object? Thanks |
|
#2
|
|||
|
|||
|
I believe you want to press Enter when you are on a TextBox or another control other than Search button.
Try the following code on the control from where you are going to press Enter: Private Sub Text1_KeyPress(KeyAscii As Integer) If KeyAscii = 13 Then btnSearch_Click 'This is the search button Event End If End Sub Let me know how it works out. |
|
#3
|
|||
|
|||
|
Thanks rhafeez... Its working.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > Visual Basic Programming > need help in VB6...plz reply ASAP |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|