|
-
Jun 20th, 1999, 08:15 PM
#1
Thread Starter
New Member
Does anyone know how to detect if the "Enter" key is pressed? Please, include some code please. Thanks!!
------------------
-
Jun 20th, 1999, 09:31 PM
#2
New Member
try this:
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then MsgBox "You pressed enter!"
End Sub
-
Jun 21st, 1999, 02:33 AM
#3
Lively Member
Try this
Private Sub TextBox1_KeyUp(KeyCode As Integer)
if keycode = vbreturn then
'DO THE THING
end if
End Sub
-
Jun 21st, 1999, 03:33 AM
#4
How can I track which keys are pressed whether they are in my application or not?
-
Jun 21st, 1999, 11:51 AM
#5
Thread Starter
New Member
Actually, I have a text box for the user to enter something and I want to execute a function when the user press "return" after he/she is finished entering something in the text box. How do you do that?
------------------
-
Sep 24th, 1999, 12:16 PM
#6
Addicted Member
make that key a HOT KEY IN Windows I Should Work Instead of haveing the hot key open the app make it Record the key
-
Sep 24th, 1999, 01:34 PM
#7
VirtuallyVB..
You can use the GetAsyncKeyState API, (I'm getting DejaVu I've Mentioned this API so much today...), eg.
Code:
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyA) Then MsgBox "You Pressed 'A'"
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Dec 28th, 1999, 11:19 PM
#8
Aaron I have a Logitech Internet Keyboard and I HATE IT. I can't assign any events to the keys on the side of the keyboard. Do you have any ideas on finding out how to get their states? I am trying to make a program that uses them for macros!
Please reply to my email address [email protected]
I really looking forward to a reply
------------------
ALF
ALFWare
[This message has been edited by ALFWare (edited 12-29-1999).]
-
Dec 29th, 1999, 01:36 AM
#9
I have a Logitech Internet Keyboard and I HATE IT. I can't assign any events to the keys on the side of the keyboard. Do you have any ideas on finding out how to get their states? I am trying to make a program that uses them extra things
The keyboard has like 18 Extra keys on it and also a LED! It would be great if I could even find a API call that would cause a event on a key press so I could find the HEX address of that key!
Please reply to my email address [email protected]
I really looking forward to a reply
p.s Did this to get it back up top! Sorry for any inconvience!
------------------
ALF
ALFWare
-
Dec 29th, 1999, 12:15 PM
#10
I really need help with this one so I am posting another message to take this one to hte top of the board sorries!
The keyboard has like 18 Extra keys on it and also a LED! It would be great if I could even find a API call that would cause a event on a key press so I could find the HEX address of that key!
Thanks again!
------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|