本文整理自网络,侵删。
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 xe2 idhttp 获取utf-8编码中文网页
Delphi如何获取系统服务(即service服务程序)列表
更多相关阅读请进入《Delphi》频道 >>