Hi there.
I want to close a topmost form by clicking elsewhere on the screen. How do I accomplish that.
I have seen examples using the procedure:
The procedure is'nt triggered... But why?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.
I want to close a topmost form by clicking elsewhere on the screen. How do I accomplish that.
I have seen examples using the procedure:
Code:
procedure WMLButtonDown(var Message: TWMLButtonDown); message WM_LBUTTONDOWN;
begin
if not PtInRect(ClientRect, Point(message.XPos, message.YPos)) then
Visible := false;
inherited;
end;
The procedure is'nt triggered... But why?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is always another way to solve it, but I prefer my way.