|
-
Aug 21st, 2000, 06:31 AM
#1
Thread Starter
Frenzied Member
Can someone tell me what is the difference between the
key_down and key_press events
-
Aug 21st, 2000, 06:37 AM
#2
Addicted Member
Hi,
Quote from MSDN
The KeyUp and KeyDown events report the exact physical state of the keyboard itself: A key is pressed down (KeyDown) and a key is released (KeyUp). In contrast, the KeyPress event does not report the state of the keyboard directly — it doesn't recognize the up or down state of the key, it simply supplies the character that the key represents.
Hope this helps,
Shaun
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Aug 21st, 2000, 08:29 AM
#3
KeyAscii is used more when working with the actual character's (letters, numbers etc.) that the key generates whereas KeyDown is only concered with the state of the key (if it's pressed).
-
Aug 21st, 2000, 08:54 AM
#4
Yes, the KeyPress event will not be raised for keys like the Arrow keys or the Function keys or any other key that don't have an ascii value. The KeyDown event on the other hand will be raised for any key pressed.
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
|