procedure TForm1.FormActivate(Sender: TObject);
begin
SetCapture(Handle);
end;
procedure TForm1.FormDeactivate(Sender: TObject);
begin
ReleaseCapture;
Close;
end;
procedure TForm1.MouseButtonDown(var Message: TWMMouse);
var
P: TPoint;
begin
P := ClientToScreen(SmallPointToPoint(Message.Pos));
if not PtInRect(BoundsRect, P) then
Close;
end;
procedure TForm1.WMLButtonDown(var Message: TWMMouse);
begin
MouseButtonDown(Message);
end;
procedure TForm1.WMMButtonDown(var Message: TWMMouse);
begin
MouseButtonDown(Message);
end;
procedure TForm1.WMRButtonDown(var Message: TWMMouse);
begin
MouseButtonDown(Message);
end;
항상 건강 과 행복이 가득하시길 ....