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 xe10 手机程序事件服务操作、退出键操作

Delphi shutdown() 关机

Delphi抓取qq聊天窗口实例

Delphi高效的byte转化sring 函数

精通Delphi模拟按键

Delphi 调节音量代码

Delphi concat 连接两个或多个字符串为一个字符串

Delphi 防止系统睡眠

Delphi如何简单取得后缀名

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



打赏

取消

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

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

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

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

评论

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