Õâ¸öÊÇÀ¹½Ø°´¼üÏûÏ¢²¢²âÊÔÊÇ·ñΪENTER¼ü¡£ begin case wParam of WM_KEYDOWN: fEatKeystroke := (p.vkCode = VK_RETURN); end; if fEatKeystroke = True then begin form1.ReplaceText; end; end;
ÎÒÏë¸Ä³ÉÀ¹½Ø°´¼ü'E'µÄ£¬Ò²²»ÖªµÀÔõôÕû ´óÏÀÃÇ°ï°ïæ°É ¼±°¡VK_RETURN¸Ä³ÉVK_E fEatKeystroke := (p.vkCode = VK_RETURN); ÐÞ¸ÄΪ fEatKeystroke := (p.vkCode = 69); vk_e²»ºÃÓà [Error] Unithook.pas(78): Undeclared identifier: 'VK_E' [Fatal Error] hook.dpr(5): Could not compile used unit 'Unithook.pas' ²éÒ»ÏÂasiicÂë±í£¬EµÄ¼üÖµÊÇ69 ×¢Òâ¡®E¡¯ºÍ¡®e¡¯ÊDz»Ò»ÑùµÄ£¬Çø·Ö´óСд fEatKeystroke := (p.vkCode = 69); Õâ¸öÎÒµÈÊÔÊÔ p.vkCode Õâ¸öÊǸÉʲôµÄ ½ÓÊÜ°´¼üÖµµÄ£¿
ÄǾ͸ijÉVKcode=69 p.vkCode ÊÇKeyDownʼþÖа´Ï¼üµÄÂëÖµ ÏÈ¿´p.vkCodeµÄ½á¹¹,Èç¹û69¿ÉÐеĻ°¾ÍºÃ,Èç¹ûÊÇsetÄØ?? Õâ¸öÊÇÅжϰ´¼üÖµµÄ£¬p.vkCode = VK_RETURNµÃ³öÒ»¸ötrue»òÕßfalseµÄ½á¹û£¬²¢·µ»Øµ½fEatKeystroke ÎÒµãVK_RETURN ½øÈ¥¿´ÁË { VK_0 thru VK_9 are the same as ASCII '0' thru '9' ($30 - $39) } { VK_A thru VK_Z are the same as ASCII 'A' thru 'Z' ($41 - $5A) } VK_E ÊDz»ÊÇûע²á°¡
project project3.exe raised exception class ERemotableException with message 'access violation at address 004037B in module'project2.exe'.read of address 00000003'.process stopped.use ......