Board index » delphi » How to cancel ApplicationEventsMyAppDeactivate ?

How to cancel ApplicationEventsMyAppDeactivate ?

Hi,
   Is it possible to cancel ApplicationEventsMyAppDeactivate? Depending on
certain conditions, I would like to be able to prevent a user from leaving
my application.

Ex:

procedure TFormMyApp.ApplicationEventsMyDeactivate(Sender: TObject);
begin
if BitBtnRecord.Tag=1 then
  begin
  "Cancel Deactivate"
  "Do Activate"
  end;
end;

Thanks

 

Re:How to cancel ApplicationEventsMyAppDeactivate ?


Hi Mathieu Valle,
on Fri, 25 May 2001 15:21:00 -0400 you wrote:

Please do NOT crosspost!

Quote
>   Is it possible to cancel ApplicationEventsMyAppDeactivate? Depending on
> certain conditions, I would like to be able to prevent a user from leaving
> my application.

procedure TFormMyApp.ApplicationEventsMyDeactivate(Sender: TObject);
begin
if BitBtnRecord.Tag=1 then
   begin
     Application.BringToFront;
     Application.MainForm.Activate;
   end;
end;

to use that event:

Application.OnDeavtivate:= ApplicationEventsMyDeactivate;

Cheers,
   Udo
--
Homepage: http://www.nesshoever.de            No mails please. Reply here.

Delphi env.:                         Global Polio Awareness Campaign 2001+
W2K.sp1, D4Pro.sp3                       More info -> http://www.2-mad.com

Other Threads

1. ADODataSet to MS Access error: WeekDayName(Weekday(TimeLog.date), False, 0) AS DateWeekDayName

2. L.EGAL C.A.B.L.E TV DE-S.C.R.A.M.B.L.E.R ddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddbbbbbbbbbbbbbbbbbbbbhbgbbbbbbbbbbbbbffffffffffffffffffffffffffffffffffffffffffffffffffffffffffqqqqqqqqqqqqqqqqqqqqq2qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqzz

3. Cancel an ExcelApplication1.WorkbookBeforeClose Event

4. ++ Meet More Women Easily With Pheromones ++ frrrtttyyyyyyyyyyyyyyyyyyyyyyyyjjjjjjjjjjjjjnnnnnccccnnnnnbbbbbbbbbbbbbbhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffdsddddddd 488 [1/2]

5. +++GET YOUR FREE PENTIUM CELERON-300+++____________________________________________________________________________________________rtyu4598rut oiwty etijew u65her iuer

6. !!!!!!!!!!!!!!!!!!!! PROGRAMS FOR SALE !!!!!!!!!!!!!!!!!!!!????????????????????????????????????????????????????????????????????????????????????????????????

7. DBNavigator HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

8. ** EVIDENCE ELIMINATING SOFTWARE** dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd 2587 [1/2]

9. ++ Meet More Women Easily With Pheromones ++ frrrtttyyyyyyyyyyyyyyyyyyyyyyyyjjjjjjjjjjjjjnnnnnccccnnnnnbbbbbbbbbbbbbbhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhffffdsdddddddddddddddddddddeee44444deeeeyyyuyp 4151 [1/2]

10. ALERT- - Rid your PC of Illegal Images rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr