Цитата:
Сообщение от Nyctos Kasignete
Я так полагаю, "убегание" кнопки реализовано вами в методе OnMouseMove? Ну вот и пропишите там проверку: если кнопка в пределах панели, то Exit из процедуры.
Код:
1 2 3 4 5 6 7 8 9 10 11 12 13 | procedure TForm1 . Button1MouseMove(Sender: TObject; Shift: TShiftState; X,
Y: Integer );
begin
if (Button1 . Top > Panel1 . Top) and (Button1 . Top < Panel1 . Top + Panel1 . Height) and
(Button1 . Left > Panel1 . Left) and (Button1 . Left < Panel1 . Left + Panel1 . Width) then
Exit;
end ;
procedure TForm1 . Button1Click(Sender: TObject);
begin
Application . Terminate;
end ;
|
|
Да, "Убегание" реализировано с помощью
OnMouseMove. Спасибо большое за помощь!