www.lucersoft.com

   
       Home  |   News  |   Downloads  |   Order  |   Contacts

 

 

Main

Home

Site map

Products

LC Backup

LC Copier

HTML Batch Editor

HTML Batch Editor PRO

Tennis 2001

Freeware

Documentation

HTML Batch Editor PRO

LC Basic

Information

Order

Update Policy

Support

Contacts

Links

 
 
 
 

 
 
 
 
 
 
 
 
 

MessageBox

Dialog functions


Syntax

 

result = MessageBox (Message, Title, Style)

 

or

 

result = MsgBox (Message, Title, Style)


Description:

 

The MessageBox function creates, displays, and operates a message box. The message box contains an application-defined message and title, plus any combination of predefined icons and push buttons. This function call directly an API function MessageBox.


Arguments:

 

Message - containing the message to be displayed.

Title - containing the title of the dialog. This parameter is optional.

Style - Specifies the contents and behavior of the message box. This parameter can be a combination of flags from the following groups of flags. Parameters can be combined by operator OR or |. To indicate the buttons displayed in the message box, specify one of the following values. This parameter is optional.

 

 
Value Meaning
MB_ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore.
MB_OK The message box contains one push button: OK. This is the default.
MB_OKCANCEL The message box contains two push buttons: OK and Cancel.
MB_RETRYCANCEL The message box contains two push buttons: Retry and Cancel.
MB_YESNO The message box contains two push buttons: Yes and No.
MB_YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel.

To display an icon in the message box, specify one of the following values.
Value Meaning
   MB_ICONEXCLAMATION An exclamation-point icon appears in the message box.

 

   MB_ICONASTERISK An icon consisting of a lowercase letter i in a circle appears in the message box.
   MB_ICONQUESTION A question-mark icon appears in the message box.
   MB_ICONHAND A stop-sign icon appears in the message box.

To indicate the default button, specify one of the following values.
Value Meaning
MB_DEFBUTTON1 The first button is the default button.

MB_DEFBUTTON1 is the default unless MB_DEFBUTTON2, MB_DEFBUTTON3, or MB_DEFBUTTON4 is specified.

MB_DEFBUTTON2 The second button is the default button.
MB_DEFBUTTON3 The third button is the default button.
MB_DEFBUTTON4 The fourth button is the default button.

 

Return value:

 

If the function succeeds, the return value is one of the following menu-item values.

Value Meaning
IDABORT Abort button was selected.
IDCANCEL Cancel button was selected.
IDCONTINUE Continue button was selected.
IDIGNORE Ignore button was selected.
IDNO No button was selected.
IDOK OK button was selected.
IDRETRY Retry button was selected.
IDTRYAGAIN Try Again button was selected.
IDYES Yes button was selected.

If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC has no effect.

 

If the function fails, the return value is False

 

 

 

 

 


Examples:

res = MessageBox("Are you sure ?","Some question",MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2)
If (res = IDYES)
  MsgBox ("Button Yes was pressed.")
Endif

 

 


See also:

 

Dialog functions


A MessageBox function is included in the lcbase.dll

 
Last updated: November 2, 2003
Copyright © 2002 Lucersoft

Add to favorites

Back