发信人: gigifan()
整理人: teleme(2000-12-06 19:00:36), 站内信件
|
【 在 jeef_xie (Feng) 的大作中提到: 】
: 我想向一个窗口发一个按键消息,但我不知道他的键码是什么。
: 有没有什么方法可以知道键盘每个键 的代码。
:
:
: .......
其实可以不用这么编,但我认为这样响应快
unit keycode;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dia logs,
StdCtrls;
type
TForm1 = class(TForm)
Label1: TLabel;
private
{ Private declarations }
protected procedure mykeydown(var msg:Twmkeydown);message wm_keydo wn;
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure tform1.mykeydown (var msg:Twmkeydown);
begin
label1.Caption:=inttostr(msg.charcode);
end;
end.
-- ※ 来源:.月光软件站 http://www.moon-soft.com.[FROM: ]
|
|