StayOnTop Property

Property that allows you to get or set whether the ProgressDialog will stay on top of all other windows. The default is True. (Note: If your concern is to allow message boxes to appear on top of the ProgressDialog, you can leave StayOnTop set to True and instead use the MsgBox method to show message boxes.)

object.StayOnTop = new_value
existing_value
= object.StayOnTop

Arguments

object

Required.  A variable containing a ProgressDialog object created by calling CreateObject or new ActiveXControl.

new_value

Required. A boolean value, True or False.

existing_value

Required. A variable to receive whether the ProgessDialog is set to stay on top of all other windows.

Remarks
As noted above, if your concern is to allow message boxes to appear on top of the ProgressDialog, you can leave StayOnTop set to True and instead use the MsgBox method to show message boxes.

If you want to use the regular built-in VBScript MsgBox function, you can set the StayOnTop property to False immediately before you show the message box and set it back to True immediately after the message box is closed.

Example


  ' Create the dialog box
  Set Dialog = CreateObject("TPFSoftware.ProgressDialog")
  ' Prevent it from automatically covering all other windows
  Dialog.StayOnTop = False