Re: OPO v2.0 Question: Closing modal window

From: Phil Herring <revdoc_at_uow.edu.au>
Date: 1997/09/17
Message-ID: <5vnehv$1e3$1_at_wyrm.its.uow.edu.au>#1/1


In article <341D76B4.4EA2_at_zg.tel.hr> Goran Jemric, goran.jemric_at_zg.tel.hr writes:
>I have a problem using OPO v2.02 (32 and 16 bit).
>I open a modal form from a parent form (to use it
>for a list of values). When user selects value I close
>the modal form and go back transffering value through
>application properties. If I close the modal form
>with CloseWindow() method everything is OK but my
>parent form appeares to have no standard toolbar
>and menus.

Don't use CloseWindow() to close a modal window - as you have discovered, it will screw things up. If you're using a modal window in the standard fashion, you'll have one or two buttons (usually "OK" and "Cancel", in whatever language you're using) that close the window. For each of these buttons:

  1. Set their IsDismissButton properties to TRUE.
  2. In their Click() methods, do whatever processing you need to do. (Usually, either a commit or rollback.)
  3. End the Click() methods with a call to Inherited.Click() to dismiss the window.
  4. To open the modal window, just call frmYourFormName.OpenModal(FALSE) The modal window will dismiss itself - don't try to close it after the call to OpenModal returns.

That's all there is to it.



Copyright 1997 Phil Herring. This article may not be reproduced for profit.
Received on Wed Sep 17 1997 - 00:00:00 CEST

Original text of this message