Registriert seit: 29. Mai 2002
37.621 Beiträge
Delphi 2006 Professional
|
14. Apr 2003, 18:27
Code:
TForm1 = class(TForm)
private
{ Private-Deklarationen }
procedure WMHotKey(var Msg : TWMHotKey); message WM_HOTKEY;
public
{ Public-Deklarationen }
end;
const ID_F12= VKF12;
procedure TForm1.WMHotKey(var Msg : TWMHotKey);
begin
if Msg.HotKey = ID_F12 then
begin
// ...;
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterHotKey(Form1.Handle, ID_F12, 0, VK_F12);
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
UnRegisterHotKey(Form1.Handle, ID_F12);
end;
Michael Ein Teil meines Codes würde euch verunsichern.
|