Closing Windows 3.1 not triggering Application close event

Closing Windows 3.1 not triggering Application close event

Post by Jerry Mitche » Sun, 08 Oct 1995 04:00:00



Does anyone know why when Windows 3.1 is closed down my Application
close event does not get triggered.  Should it?  Is there any way I
can make it happen?  This is using PowerBuilder 3.   Any help

 
 
 

Closing Windows 3.1 not triggering Application close event

Post by Mike Swa » Tue, 10 Oct 1995 04:00:00


: Does anyone know why when Windows 3.1 is closed down my Application
: close event does not get triggered.  Should it?  Is there any way I
: can make it happen?  

  If I remember correctly, what Windows does is ask every window on the
desktop whether it can close. If they all respond yes, Windows shuts
down, on the principle that everything that needed to be saved must have
been, or the windows wouldn't have responded that they could be closed.
  I suggest that you put you shutdown code in your MDI frame, assuming
that you use MDI.

--

"I can see clearly now my brain is gone.
 I can see all the bicycles in my way."

 
 
 

Closing Windows 3.1 not triggering Application close event

Post by Martin R. Gre » Tue, 10 Oct 1995 04:00:00


Yes, I think it should - in any case, place your critical exit code in
the close event of your main window, where you can abort the close if
necessary.  I have heard of the App close event not being closed
before, but I have never heard of the main window close event being
missed.

HTH - Martin.


>Does anyone know why when Windows 3.1 is closed down my Application
>close event does not get triggered.  Should it?  Is there any way I
>can make it happen?  This is using PowerBuilder 3.   Any help


=======================================================================

 Toronto, Ontario, CANADA           |       Voice:    (01)416-778-1887
                                    |       Fax:      (01)416-469-0712
 Opinions expressed are mine alone. |       VoiceTel: (01)416-331-7581
=======================================================================

   In my experience, a man is just about as happy as he makes up his
   mind to be.

                           Abraham Lincoln.

=======================================================================

 
 
 

Closing Windows 3.1 not triggering Application close event

Post by Martin R. Gre » Sat, 14 Oct 1995 04:00:00


The key here is to use the CloseQuery event, not Close.  As Mike
indicates, Windows asks all windows if it can close them.  PB supports
this with the CloseQuery event.  Close may not get called when Windows
is shut down, but you can be sure that CloseQuery will.

HTH - Martin



>: Does anyone know why when Windows 3.1 is closed down my Application
>: close event does not get triggered.  Should it?  Is there any way I
>: can make it happen?  
>  If I remember correctly, what Windows does is ask every window on the
>desktop whether it can close. If they all respond yes, Windows shuts
>down, on the principle that everything that needed to be saved must have
>been, or the windows wouldn't have responded that they could be closed.
>  I suggest that you put you shutdown code in your MDI frame, assuming
>that you use MDI.
>--

>"I can see clearly now my brain is gone.
> I can see all the bicycles in my way."

=======================================================================

 Toronto, Ontario, CANADA           |       Voice:    (01)416-778-1887
                                    |       Fax:      (01)416-469-0712
 Opinions expressed are mine alone. |       VoiceTel: (01)416-331-7581
=======================================================================

   In my experience, a man is just about as happy as he makes up his
   mind to be.

                           Abraham Lincoln.

=======================================================================

 
 
 

1. How do I trap a window event when closing a window

I recently started using the Coolbar found in ClassMate. I have a
coolbar that I have assigned three toolbars. One of them is a general
toolbar for closing and exiting the app as well as having all the
navigation buttons. I am disabling some of these buttons if there is
not a child window open. I have been successfull in disabling the
buttons if I select the close button on the toolbar. What I have
noticed is if I close the window using the [X] in the corner of the
child window my close method is not called. How can I trap this? Again
remeber I am using Classmate and I have never overidden the dispatch
method.

2. TriGen 386SX Motherboard RAM Enable Switches?

3. Window:Close() when Win98 closes

4. Automated File Download Manager required

5. Howto close (kill) the application under test when it's not responding?

6. Question about scripting

7. ClasMAte 2.02 can not close application

8. Closing Windows Applications from Powerbuilder

9. Closing other windows applications

10. application closed by windows

11. how to close a word session from sas without closing other active word session(s)