冥界3大法王 发表于 2020-5-19 08:57

如何把按键显示在最顶层窗口上(屏幕最顶上)



求改Delphi实现代码:
以下是显示在Delphi窗体内的代码:
貌似不支持组合键显示

unit Unit2;

interface

uses
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs;

type
TForm2 = class(TForm)
    procedure FormCreate(Sender: TObject);
private
    { Private declarations }
    procedure MyMsg(var msg: TWMKeyDown); message WM_KEYDOWN;
public
    { Public declarations }
end;

var
Form2: TForm2;

implementation

{$R *.dfm}

procedure TForm2.FormCreate(Sender: TObject);
begin
Canvas.Font.Size := 24;
Canvas.Font.Style := ;
Canvas.Font.Color := clRed;
Canvas.Brush.Color := clWhite;
end;

procedure TForm2.MyMsg(var msg: TWMKeyDown);
var
buf: array of Char;
rect: TRect;
str: string;
begin
{获取}
GetKeyNameText(msg.KeyData, buf, Length(buf));
{画出来}
str := buf;
rect := ClientRect;
Canvas.FillRect(rect);
Canvas.TextRect(rect, str, );
inherited;
end;

end.

cyl279 发表于 2020-5-19 09:16

感谢分享,好久没坐沙发了

精于勤 发表于 2020-5-19 09:35

路过打酱油

八月不到底 发表于 2020-5-19 09:41

大佬讲话太深奥了

kuqideyanlei 发表于 2020-5-19 09:49

能不能把你变态版x64dbg发我一份啊???

沐.神 发表于 2020-5-19 10:14

我也想要你的变态版x64dbg {:1_889:}{:1_889:}

shghe 发表于 2020-5-19 10:23

法王大仙求变态版x64dbg~~~~~~~

kkw2011 发表于 2020-5-19 10:49

能不能把你变态版x64dbg发我一份啊???
页: [1]
查看完整版本: 如何把按键显示在最顶层窗口上(屏幕最顶上)