I gave you an example, but I see why you ask. To make it clearer eg for a
key in the mainform.keydown
//to trap escape
if Key = VK_ESCAPE then
    Key = 0;

I expected for a mouse event on a menu the following would work:
procedure TMainForm.Menu1Click(Sender: TObject);
begin
sender:=nil;
end;

But in fact it doesnt!
So the hook would have to be something like:
procedure TMainForm.Menu1Click(Sender: TObject);
begin
sender:=nil;
Menu1.Enabled:=false;
end;

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to