كيف عند الضغط للخروج من البرنامج تطلب التاكييد ؟
#5
Unit1
كود :
unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Unit2, StdCtrls; type TForm1 = class(TForm) procedure FormClose(Sender: TObject; var Action: TCloseAction); private { Private declarations } public { Public declarations } end; var Form1: TForm1; Actions: TCloseAction; implementation {$R *.dfm} procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction); begin Form2.ShowModal; Action := Actions; end; end.
Unit2
كود :
unit Unit2; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, StdCtrls; type TForm2 = class(TForm) Button1: TButton; Button2: TButton; procedure Button1Click(Sender: TObject); procedure Button2Click(Sender: TObject); private { Private declarations } public { Public declarations } end; var Form2: TForm2; implementation {$R *.dfm} uses Unit1; procedure TForm2.Button1Click(Sender: TObject); begin Actions := caHide; Close; end; procedure TForm2.Button2Click(Sender: TObject); begin Actions := caNone; Close; end; end.
الرد


الردود في هذا الموضوع
كيف عند الضغط للخروج من البرنامج تطلب التاكييد ؟ - بواسطة Agmcz - 01-04-2012, 10:03 PM

التنقل السريع :


يقوم بقرائة الموضوع: بالاضافة الى ( 1 ) ضيف كريم