Wednesday, March 2, 2011

Say no to program closings!

Here's how to prompt users whether they really want to exit your program or not (regardless of how they choose to close it):

  1. Select your form (named "Form1" for example) and double click on its "OnCloseQuery" event
  2. Define the "FormCloseQuery" procedure as follows:
1: procedure TForm1.FormCloseQuery(
2:   Sender: TObject;
3:   var CanClose: Boolean);
4: begin
5:   if(mrNo = Mess

Twitter Delicious Facebook Digg Stumbleupon Favorites More

Design by Kang Iwan K-sev | Thank's for your visit To My Site - Ridwan Mulyana | Cibeureum