PDA

Click to See Complete Forum and Search --> : "SendKeys"


venkatraman_r
Jan 26th, 2000, 05:11 PM
Hi All,

I have a text box and a command button. I enter some text in the text box and once the command button is clicked, based on the text, some actions are performed. Once i enter text and press enter key, I need to fire the click event of the command button. I know it is done using "Send Keys", but I forgot the syntex.

Thanks for any help.

------------------
Regards,

Venkat

venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net

Mark Sreeves
Jan 26th, 2000, 05:35 PM
Don't bother with sendkeys when activating something within the same form, it's messy

try this instead:

Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Command1_Click
End If

End Sub


------------------
Mark Sreeves
Analyst Programmer

Mark.Sreeves@Softlab.co.uk
A BMW Group Company

(please include your vb-world screen name if you email me so I can work out what the 'eck you're talking about!) :)

venkatraman_r
Jan 26th, 2000, 05:56 PM
Hi Mark,

Thanx it worked..Ok i would add my vb-world user name when mailing you...

..And...I felt something difficult in reading the last few words of ur message? Were u scolding me? eh?? ;)

Thanx for the help.

------------------
Regards,

Venkat

venkatraman_r@hotmail.com
ICQ: 45714766
http://venkat.iscool.net