delphi crtl+D组合键怎么写? 求大虾
varForm1:TForm1;HotKeyId:Integer;implementation{$R*.dfm}procedureTForm1.FormCreate(Se...
var
Form1: TForm1;
HotKeyId: Integer;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
HotKeyid:=GlobalAddAtom('MyHotKey')-$C00;
RegisterHotKey(Handle, hotkeyid,MOD_ALT, VK_F8);
end;
procedure TForm1.HotKeyDown(var Msg: Tmessage);
begin
if (Msg.LparamLo = MOD_ALT) AND (Msg.LParamHi = VK_F8 )then
begin
ShowMessage('F8');
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(handle, HotKeyId);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(handle, HotKeyId);
end;
用 ALT,shift 都可以 。怎么用ctrl? mod_ctrl 好像不能用 展开
Form1: TForm1;
HotKeyId: Integer;
implementation
{$R *.dfm}
procedure TForm1.FormCreate(Sender: TObject);
begin
HotKeyid:=GlobalAddAtom('MyHotKey')-$C00;
RegisterHotKey(Handle, hotkeyid,MOD_ALT, VK_F8);
end;
procedure TForm1.HotKeyDown(var Msg: Tmessage);
begin
if (Msg.LparamLo = MOD_ALT) AND (Msg.LParamHi = VK_F8 )then
begin
ShowMessage('F8');
end;
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(handle, HotKeyId);
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotKey(handle, HotKeyId);
end;
用 ALT,shift 都可以 。怎么用ctrl? mod_ctrl 好像不能用 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询