Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2003.06.26;
Скачать: CL | DM;

Вниз

Отмена закрытия приложения   Найти похожие ветки 

 
inspirion ©   (2003-06-09 10:24) [0]

Мастера подскажите что я не правильно делаю
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Application.CreateForm(TMessageForm, MessageForm);
MessageForm.Label1.Caption:="Close?";
MessageForm.ShowModal;
if MessageForm.ModalResult=mrOK then begin
close;
end;
if MessageForm.ModalResult=mrCancel then
exit;
end;


 
Stas ©   (2003-06-09 10:29) [1]

События CloseQuery
procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin

Application.CreateForm(TMessageForm, MessageForm);
MessageForm.Label1.Caption:="Close?";
MessageForm.ShowModal;
if MessageForm.ModalResult=mrOK then
CanClose:=true;

if MessageForm.ModalResult=mrCancel then
CanClose:=false;


end;


 
Skier ©   (2003-06-09 10:57) [2]

procedure TForm1.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
begin
with TMessageForm.Create(Application) do begin
try
Label1.Caption := "Close?";
CanClose := ShowModal = mrOK;
finally
Free;
end; //try
end; //with
end;


 
Armen   (2003-06-09 11:16) [3]

procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Application.CreateForm(TMessageForm, MessageForm);
MessageForm.Label1.Caption:="Close?";
MessageForm.ShowModal;
if MessageForm.ModalResult<>mrOK
then Action:= caNone;
MessageForm.Free;
end;


 
PI{}Puk ©   (2003-06-09 12:49) [4]


> procedure TMainForm.FormClose(Sender: TObject; var Action:
> TCloseAction);
> begin
> Application.CreateForm(TMessageForm, MessageForm);
> MessageForm.Label1.Caption:="Close?";
> MessageForm.ShowModal;
> if MessageForm.ModalResult=mrOK then begin
> close; {********неправильно********}
Action := caFree;
> end;
> if MessageForm.ModalResult=mrCancel then
> exit;
> end;




Страницы: 1 вся ветка

Текущий архив: 2003.06.26;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.035 c
4-84840
I:D
2003-04-25 18:09
2003.06.26
SetWindowLong(hwnd,GWL_WNDPROC,Integer(P));


1-84239
MalkoLinge
2003-06-12 18:26
2003.06.26
Если ActiveX контрол не имеет ProgID,


1-84170
yaJohn
2003-06-11 11:27
2003.06.26
Алгоритм сравнения текстов


6-84501
AllDontFire
2003-03-31 15:45
2003.06.26
Отлов события подключения к ресурсам к ЛВС?


7-84794
Демонов Е.В.
2003-04-18 09:15
2003.06.26
Дата Соэдания каталога