VB °æ (¾«»ªÇø)
·¢ÐÅÈË: bloom (©À©Á©Â©Ã©Ä©Æ©Ç¨), ÐÅÇø: VB
±ê Ìâ: GetKeyboardState(Ó²¼þÓëϵͳ)(תÔØ)
·¢ÐÅÕ¾: ¹þ¹¤´ó×϶¡Ïã (2000Äê09ÔÂ07ÈÕ18:38:03 ÐÇÆÚËÄ), תÐÅ
¡¾ ÒÔÏÂÎÄ×ÖתÔØ×Ô cnTemp ÌÖÂÛÇø ¡¿
¡¾ ÔÎÄÓÉ catchy Ëù·¢±í ¡¿
·¢ÐÅÈË: yucheng (ÎÞ»°¿É˵), ÐÅÇø: VisualBasic
·¢ÐÅÕ¾: BBS ˮľÇ廪վ (Wed Mar 29 23:47:05 2000) WWW-POST
GetKeyboardState
VBÉùÃ÷
Declare Function GetKeyboardState Lib "user32" Alias "GetKeyboardState"
(pbKeyState As Byte) As Long
˵Ã÷
È¡µÃ¼üÅÌÉÏÿ¸öÐéÄâ¼üµ±Ç°µÄ״̬
·µ»ØÖµ
Long£¬·ÇÁã±íʾ³É¹¦£¬Áã±íʾʧ°Ü¡£»áÉèÖÃGetLastError
²ÎÊý±í
²ÎÊý ÀàÐͼ°ËµÃ÷
pbKeyState Long£¬×ܹ²º¬256¸öÌõÄ¿µÄ×Ö½ÚÊý×éÖеĵÚÒ»¸öÏîÄ¿¡£Ã¿¸ö×Ö½Ú¶¼»á¸½´øÔØÈë
ÓëÐéÄâ¼ü¶ÔÓ¦µÄ״̬¡£È翪¹Ø¼ü´ò¿ª£¬Ôòλ0ÉèΪ1£¨¿ª¹Ø¼ü°üÀ¨CapsLock£¬ NumLock£¬
ScrollLock£©£»Èçij¸ö¼üµ±Ê±°´Ï£¬Ôòλ7Ϊ1£»ÈçÒѾ̧Æð£¬ÔòΪ0
×¢½â
ÐéÄâ¼üÂë³£Êý VK_? ×÷ΪÊý×éµÄË÷ÒýʹÓá£Õâ¸öº¯ÊýÏàÓ¦ÓÚÈ¡µÃ°´¼ü״̬ÓÚһ˲¼äµÄ¡°¿ì
ÕÕ¡±¡ª¡ª¼ü°´Ï»òËÉ¿ªÒÔºó£¬Êý×é²»»á×Ô¶¯¸üС£ÔÚwin32ÖÐ×¢ÒâÓÃÒ»¸ö×Ö½ÚÊý×é±ÜÃâÓÉ
ÓÚvbÏòUnicodeµÄÄÚ²¿×ª»»¶øµ¼Ö´íÎó
--
--
¡î À´Ô´:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: casi.bbs@smth.org]
--
¡ù תÔØ:£®¹þ¹¤´ó×϶¡Ïã bbs.hit.edu.cn£®[FROM: 202.118.247.254]
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
Ò³ÃæÖ´ÐÐʱ¼ä£º2.645ºÁÃë