..
.
.
private
Procedure WMHotkey( Var msg: TWMHotkey ); message WM_HOTKEY;
public
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
If not RegisterHotkey( Handle, 1, MOD_ALT or MOD_SHIFT, VK_F9 ) Then
ShowMessage('Unable to assign Alt-Shift-F9 as hotkey.');
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotkey( Handle, 1 );
end;
Procedure TForm1.WMHotkey( Var msg: TWMHotkey );
Begin
If msg.hotkey = 1 Then Begin
If IsIconic( Application.Handle ) Then
Application.Restore;
BringToFront;
End;
End;
..
.
.
private
Procedure WMHotkey( Var msg: TWMHotkey ); message WM_HOTKEY;
public
end;
var
Form1: TForm1;
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
If not RegisterHotkey( Handle, 1, MOD_ALT or MOD_SHIFT, VK_F9 ) Then
ShowMessage('Unable to assign Alt-Shift-F9 as hotkey.');
end;
procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
begin
UnRegisterHotkey( Handle, 1 );
end;
Procedure TForm1.WMHotkey( Var msg: TWMHotkey );
Begin
If msg.hotkey = 1 Then Begin
If IsIconic( Application.Handle ) Then
Application.Restore;
BringToFront;
End;
End;
이렇게 하심됩니다.
그럼..20000.