Sign up on the Revelation Software website to have access to the most current content, and to be able to ask questions and get answers from the Revelation community

At 21 APR 1999 01:50:27PM Mark Glicksman wrote:

How can I, from a stored procedure, close all windows in my applicaton, including any open popups and messages, except for my application startup window and one other "home page" window? In other words, I want to close every open window and return to a "home page" form.

Mark Glicksman

Glenside, PA


At 21 APR 1999 02:41PM Don Bakke wrote:

Mark,

One way is to use the Utility("OBJECTLIST") function to get the list of running OpenInsight windows. You can then loop through this and send a CLOSE event or do a Utility("DESTROY"). The former takes into consideration unsaved changes while the latter is unconditional.

dbakke@srpcs.com

SRP Computer Solutions


At 21 APR 1999 10:22PM Mark Glicksman wrote:

Bingo! Objectlist works. Thanks.

Mark Glicksman

Glenside, PA


At 22 APR 1999 04:28AM Oystein Reigem wrote:

Don,

Just a detail. Is there something special you must do with e.g modal windows? Must you close them before their parents? In general - are there cases where order is important?

- Oystein -


At 22 APR 1999 08:42AM Don Bakke wrote:

Oystein,

Interesting question. The only way I've ever implemented this is in the CLOSE event of a main application window so I've never had to deal with modal windows running. My hunch is that with Utility("DESTROY") you don't have to worry (because of parent child relationships) but sending a CLOSE event would require you to deal with the modal windows first.

dbakke@srpcs.com

SRP Computer Solutions


At 22 APR 1999 11:16AM Mark Glicksman wrote:

Well, I have had problems closing modal windows - messages and some popups (other popups close with no trouble). I have tried destroy, send_event close, and end_window, with the same results. So, I'm now looking at the code associated with each modal window more closely. I'll let you know what I find.

glicks@compuserve.com

BG-Map Botanical Garden Mapping System


At 22 APR 1999 12:13PM Don Bakke wrote:

Mark,

From reading about Utility("DESTROY") it appears that it may be prevented from completing it's task if the WM_CLOSE message (i.e. the CLOSE event) prevents this from happening (e.g. Returns 0 instead of 1). But this is just a guess.

Alternatively, I think you can call the Windows API command DestroyWindow() directly. It may be able to be halted as well however. I haven't tried this so use at your own risk!

dbakke@srpcs.com

SRP Computer Solutions


At 23 APR 1999 02:19PM Mark Glicksman wrote:

I've go my close all windows routine to work perfectly. There were a few "modal" statements in my code that shouldn't have been there, when I got rid of them - no problem closing modal windows. Here's what I used:

Declare Function Send_Event, Utility

AllWindows=Utility('OBJECTLIST', '', 'WINDOW')

I =1

WindowName=AllWindows[i]

Loop Until WindowName="

Begin Case
Case WindowName=VQF_HOME"
Case WindowName=MAINMENU"
Case 1
  Retval=Send_Event(WindowName, "CLOSE")
End Case
I += 1
WindowName=AllWindows[i]

Repeat

glicks@compuserve.com

BG-Map Botanical Garden Mapping System

View this thread on the forum...

  • third_party_content/community/commentary/forums_nonworks/9186c7f36f7d54cc8525675a0062010e.txt
  • Last modified: 2023/12/28 07:40
  • by 127.0.0.1