Investment Studio > Views > Downloads > Downloader > ActiveX interface > Shell > popup
long Shell.popup(BSTR text, long wait, BSTR caption, long flags)
Displays a Windows message dialog containing the text string. Multiple lines can be displayed by inserting newline characters in the string.
If caption is empty, the caption of the message dialog is "Script". Otherwise, the message dialog is headed by the caption string.
If wait > 0, the message dialog is automatically closed after wait seconds.
The meaning of the flags argument is as in the Win32 API MessageBox function, i.e. it determines which icon and which combination of buttons are displayed.
Use a binary OR to combine one of the icon codes,
| Constants.MB_ICONASTERISK | Same as MB_ICONINFORMATION |
| Constants.MB_ICONERROR | In Windows 9x, same as MB_ICONHAND |
| Constants.MB_ICONEXCLAMATION | Exclamation point. |
| Constants.MB_ICONHAND | Same as MB_ICONSTOP |
| Constants.MB_ICONINFORMATION | Lowercase "i" in a circle. |
| Constants.MB_ICONQUESTION | Question mark. |
| Constants.MB_ICONSTOP | Stop sign. |
| Constants.MB_ICONWARNING | In Windows 9x, same as MB_ICONEXCLAMATION |
(or no icon code for no icon) with one or more of the button codes,
| Constants.MB_OK | Show OK button. |
| Constants.MB_OKCANCEL | Show OK and Cancel buttons. |
| Constants.MB_RETRYCANCEL | Show Retry and Cancel buttons. |
| Constants.MB_ABORTRETRYIGNORE | Show Abort, Retry and Ignore buttons. |
| Constants.MB_YESNO | Show Yes and No buttons. |
| Constants.MB_YESNOCANCEL | Show Yes, No and Cancel buttons. |
| Constants.MB_DEFBUTTON1 | Default. First button is the default button. |
| Constants.MB_DEFBUTTON2 | Second button is the default button. |
| Constants.MB_DEFBUTTON3 | Third button is the default button. |
| Constants.MB_DEFBUTTON4 | Fourth button is the default button. |
optional text codes,
| Constants.MB_RIGHT | Windows 9x: right-justify text. |
| Constants.MB_RTLEADING | Windows 9x: use right-to-left reading order on Hebrew and Arabic systems. |
and optional dialog codes:
| Constants.MB_SERVICE_NOTIFICATION | NT-specific. See Win 32 API. |
| Constants.MB_DEFAULT_DESKTOP_ONLY | Default desktop must have input focus. |
| Constants.MB_SETFOREGROUND | Make message dialog the foreground window. |
| Constants.MB_APPLMODAL | Default. See Win32 API. |
| Constants.MB_TASKMODAL | Similar to MB_APPLMODAL. See Win 32 API. |
| Constants.MB_SYSTEMMODAL | Suspend all applications. See Win 32 API. |
Shell.popup returns 0 if no button was clicked within wait (> 0) seconds. It returns one of the following codes if a button was clicked:
| Constants.IDABORT | The user clicked Abort. |
| Constants.IDCANCEL | The user clicked Cancel. |
| Constants.IDNO | The user clicked No. |
| Constants.IDOK | The user clicked OK. |
| Constants.IDRETRY | The user clicked Retry. |
| Constants.IDYES | The user clicked Yes. |
See also Shell.beep, Shell.echo.