MsgBox :
MsgBox ( flag, "title", "text" [, timeout ] )====================================================
- Title : is the title of the msgbox .
- Text : is the text of the msgbox .
- Flag :
and the possible button combinations ( Cancel, Try Again,Yes ,.....) .and also the default button .
- The flag parameter values:
| Decimal flag | Button-related result |
|---|---|
| 0 | OK button |
| 1 | OK and Cancel |
| 2 | Abort, Retry, and Ignore |
| 3 | Yes, No, and Cancel |
| 4 | Yes and No |
| 5 | Retry and Cancel |
| 6 | Cancel, Try Again, Continue |
| Decimal flag | Icon-related Result |
|---|---|
| 0 | No icon |
| 16 | Stop-sign icon |
| 32 | Question-mark icon |
| 48 | Exclamation-point icon |
| 64 | Information-sign icon |
example :
but what if we want OK and Cancel and the Stop-sign icon
what we can do ? .
it easy we just we add the button num and the Icon num
example :
We want "Question-mark icon with OK and Cancel button"
Question-mark icon = 32
OK and Cancel button = 1
32 + 1 = 33
so the new num is 33
---------------------------------------------------------------------------------------------------------------------
- timeout
is the time in seconds , After the timeout has elapsed the message box will be automatically closed