小键盘的Enter和大键盘的Enter

  • 主题发起人 主题发起人 import
  • 开始时间 开始时间
I

import

Unregistered / Unconfirmed
GUEST, unregistred user!
{ The following code sample demonstrates differentiating
between these two ENTER keys:
}
 
procedure TForm1.WMKeyDown(var Message: TWMKeyDown);
begin
inherited;
case Message.CharCode of
VK_RETURN: // ENTER pressed
if (Message.KeyData and $1000000 <> 0) then
// Test bit 24 of lParam
ShowMessage('ENTER on numeric keypad')
else
ShowMessage('ENTER on Standard keyboard');
end;
end;
 
 

Similar threads

I
回复
0
查看
617
import
I
I
回复
0
查看
574
import
I
I
回复
0
查看
722
import
I
后退
顶部