窗口隐藏如何用快捷键,把它调出来。(如 ctrl+f4)?(20分)

  • 主题发起人 主题发起人 spnoten
  • 开始时间 开始时间
S

spnoten

Unregistered / Unconfirmed
GUEST, unregistred user!
窗口隐藏如何用快捷键,把它调出来。(如 ctrl+f4)?
 
unit Unit1;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls;

type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
procedure WMHotKey(var Message: TMessage); message WM_HOTKEY;
public
{ Public declarations }
end;

var
Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.WMHotKey(var Message: TMessage);
begin
application.Restore;
application.bringtofront;
showmessage('CTRL-F7 pressed!');
end;

procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterHotKey(form1.Handle,123,mod_control,vk_f7);
end;
 
别忘了退出的时候注销热键啊!
 
如何注销热键?不好意思,菜鸟菜鸟....
 
后退
顶部