MsgBox Method (ProgressDialog)

Displays a simple dialog box containing a message, one or more push buttons, and an optional icon. This message dialog box is guaranteed not to be covered by the ProgressDialog used to create it. Note: The Dialog object also possesses a MsgBox function -- but that function is not guaranteed to cover the ProgressDialog box.

return_value = object.MsgBox text, caption, flags
 

Arguments

object

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

text

Required. The message to display in the dialog box.

caption

Optional. The title to display in the title bar of the dialog box.

flags

Optional. Integer that determines the icon and the buttons to be displayed in the message dialog box. For more information, see the description of the Buttons parameter at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctmsgbox.asp

return_value

Optional. An integer indicating which button the user pressed to close the message box. For a description of possible values, see the description of the return values at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctmsgbox.asp

Remarks
Use this function to display messages if you want to be sure the message dialog box will cover the ProgressDialog. Otherwise, use the built-in VBScript MsgBox function if you can. For information about the built-in MsgBox function, see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vsfctmsgbox.asp.

To use this MsgBox method, you must already have created a ProgressDialog object, and you must use the dialog object to invoke MsgBox.

See also the StayOnTop property.

Example

  ' Create the progress dialog box
  Set PDlg = CreateObject("TPFSoftware.ProgressDialog")


  ' Set the title and show the progress dialog box  PDlg.Caption = "My Progress"  PDlg.Open
  ' Display a message box on top of the ProgressDialog  PDlg.MsgBox "Can you see this?", _    "A Quick Question", vbQuestion + vbYesNo
  ' Hide the progress dialog box  PDlg.Close