How can i make an external application dialog modal in Xbase

This forum is for eXpress++ general support.
Post Reply
Message
Author
User avatar
unixkd
Posts: 565
Joined: Thu Feb 11, 2010 1:39 pm

How can i make an external application dialog modal in Xbase

#1 Post by unixkd »

Hi all

How can i make an external application dialog modal in Xbase ???

Thanks

Joe

User avatar
rdonnay
Site Admin
Posts: 4722
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: How can i make an external application dialog modal in X

#2 Post by rdonnay »

According the the Xbase++ docs, Windows does not support system wide modality.

XbpWindow:setModalState()
Defines the window as modal or non-modal.

:setModalState( <nStatus> ) --> lSuccess
Parameters
<nStatus>
<nStatus> must be included and must be one of the constants defined in XBP.CH:

Constants for the modality of windows
Constant Description
*) Not supported by Windows
XBP_DISP_MODELESS Window is not modal
XBP_DISP_APPMODAL Window is modal application wide
XBP_DISP_SYSMODAL *) Window is modal system wide


Return
This method returns the value .T. (true) if the window status could be set, otherwise .F. (false) is returned.

Description
The method :setModalState() sets the "modality" of a window. The user can leave a non-modal window at any time simply by clicking the mouse in another window. A modal window, however, must be closed before another windows can be activated. The method :getModalState() can be used to determine the current modality of a window.

Important note:

If XBP_DISP_APPMODAL is specified, the owner of the window is locked (disabled). This means that the parent and the owner must be different. If the parent and owner are the same, the parent is also disabled. All children are also disabled and output to the window is no longer possible, because it is also a child of the disabled parent. However, the desktop window is an exception. It can be used for both parent and owner.

For example, to create modal XbpDialog window, AppDesktop() is normally used as parent while SetAppWindow() is the owner. This disables the application window until the modal state is reset to XBP_DISP_MODELESS.
The eXpress train is coming - and it has more cars.

Post Reply