unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
private
procedure WMHotKey(var Msg : TWMHotKey); message WM_HOTKEY;
{ Private declarations }
public
{ Public declarations }
end;
const ID_pnt= ord('.');
const ID_min= ord('-');
var
Form1: TForm1;
ini:Tinifile;
implementation
{$R *.dfm}
procedure TForm1.WMHotKey(var Msg : TWMHotKey);
begin
if Msg.HotKey = ord('.') then //<-- solche Sachen macht er nicht
showmessage('.');
if Msg.HotKey = ord('-') then
showmessage('-');
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
RegisterHotKey(Form1.Handle, ID_pnt, 0, ord('.'));
RegisterHotKey(Form1.Handle, ID_min, 0, ord('-'));
end;
procedure TForm1.FormDestroy(Sender: TObject);
begin
UnRegisterHotKey(Form1.Handle, ord('.'));
UnRegisterHotKey(Form1.Handle, ord('-'));
end;
end.