本文整理自网络,侵删。
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.
相关阅读 >>
Delphi concat 连接两个或多个字符串为一个字符串
更多相关阅读请进入《Delphi》频道 >>