Command: MsgBoxSetPos
- Updated2024-09-12
- 3 minute(s) read
Command: MsgBoxSetPos
Command: MsgBoxSetPos
Specifies the size and position of the next message box.
Input Parameters
MsgBoxXPos |
Specifies the x-position of a message box in relation to the left edge. |
MsgBoxYPos |
Specifies the y-position of a message box, in relation to the bottom edge. |
MsgBoxWidth |
Specifies the width of a message box. |
MsgBoxHeight |
Specifies the height of a message box. |
| Note Use the MsgBoxSetPos command before the MsgBoxDisp command that displays the message, because DIAdem deletes the set values and then displays messages with the default settings. |
Example
In the following example, DIAdem opens a message box with three buttons. Use the MsgBoxSetPos command to set the message box in the upper left corner. Use the MsgButtonTextSet command to replace the default text with your own text. In the MsgState variable, DIAdem saves the button you clicked to close the message box. DIAdem displays a different type of dialog box depending on which button you click. At the end of the example, a non-modal message remains open for 10 more seconds. The script has been executed at this point.
| VBScript | Python |
Call MsgBoxSetPos(10, 10, 30, 20) Call MsgButtonTextSet("Step&1", "Step&2", "Step&3") Call MsgBoxDisp("Select next step","MB_YESNOCANCEL") Select Case MsgState Case "IDYes" Call MsgBoxDisp("Step 1", "MB_OK", "MsgTypeNote",, 5) Case "IDNo" Call MsgBoxDisp("Step 2", "MB_OK", "MsgTypeInformation",, 5) Case "IDCancel" Call MsgBoxDisp("Step 3", "MB_OK", "MsgTypeWarning",, 5) End Select MsgNotModal = TRUE Call MsgBoxDisp("Example completed", "MB_NOBUTTON", "MsgTypeNote",, 10,MsgNotModal)
Related Topics
Command: AutoLoopInit | Command: LoopDeInit | Command: LoopInc | Command: LoopInit | Command: MsgBoxCancel | Command: MsgBoxDisp | Command: MsgBoxStateResetAll | Command: MsgButtonTextSet | Command: MsgLineDisp | Command: ProcessMessages | Variable: MsgButtonType | Variable: MsgNotModal | Variable: MsgState | Variable: MsgStdButton | Variable: MsgText | Variable: MsgTimeOut | Variable: MsgType

