delphi 如何取得键盘每个键


本文整理自网络,侵删。

 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 获取北京时间

Delphi 收集了比较全的字符串进制转换

Delphi 关闭指定窗口标题的窗口

Delphi xe2 idhttp 获取utf-8编码中文网页

Delphi 取得文件版本

sendmessage这个函数有很多奇妙的用法

Delphi 系统日期时间格式设置

Delphi tlistbox添加横向滚动条

Delphi如何获取系统服务(即service服务程序)列表

Delphi fdmemtable1建立缓存表

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...