This command allows you to set options for the MSG_WINDOW - including font size, font color, background color, and web page mode. It can also be used to return the contents of a web page.
Syntax
MSG_WIN_OPT option_number, setting_number
Valid entries for the option_number and setting_number parameters are:
option |
explanation |
setting |
description |
0 |
Reset all of the MSG_WIN_OPT options to their default values. |
0 |
|
1 |
Set the font size for the message text. In PDA mode, this option will be ignored and the smallest available font size will be used. |
8 to 48 |
Valid font sizes are integers from 8 to 48. |
any other number |
Return to the default font size. |
||
2 |
Set the color for the message text. |
0 to 16777215 |
RGB value for the desired font color. |
any other number |
Return to the default font color. |
||
3 |
Set the color for the message background. |
0 to 16777215 |
RGB value for the desired background color. |
any other number |
Return to the default background color. |
||
4 |
Set the type of information to be referenced by the MSG_WINDOW command: a string of plain text, the address of a web page, or a string of HTML code. |
2 |
|
1 |
The address of a web page. |
||
0 |
Plain text (the default setting). |
||
5 |
When displaying a web page, configure the display of the Back menu at the top of the message window. If the web page contains links to other pages, the Back menu gives users a way to return to the previous page. |
1 |
Display a Back menu at the top of the message window. |
0 |
Do not display a Back menu (the default setting). |
||
6 |
When a web page is already displayed on the message window, this option works as a trigger to return the contents of the web page (from <body> to </body>) as a string. Four formats are available for the web page contents. (example) ● InnerText and InnerHTML begin with the html contents between <body> and </body>, while OuterText and OuterHTML begin with the html contents including <body> and </body>. ● InnerText and OuterText strip off all HTML tags before returning a string, which means that the strings they return are exactly the same. InnerHTML and OuterHTML do not strip off any HTML tags. ● All four formats are supported by Microsoft Internet Explorer, but some may not be supported in other web browsers. |
1 |
Return InnerText for the web page. |
2 |
Return OuterText for the web page. |
||
3 |
Return InnerHTML for the web page. |
||
4 |
Return OuterHTML for the web page. |
||
7 |
Configure the display of the Minimize menu at the top of the message window. The user can click this menu to minimize the message window to the Windows Taskbar. |
1 |
|
0 |
Do not display a Minimize menu (the default setting). |
||
8 |
When displaying text, allow the user to click and drag the message window to a different position on their screen. This is especially useful when displaying a message window without a title bar. |
1 |
Allow the user to drag the message window to a different position. |
0 |
Do not allow the user to drag the message window to a different position (the default setting). |
Return value
This command returns the number 0 if you specify an invalid option_number; a string value if executed with option_number 6, or the number 1 for all other cases.
Notes
This command allows you to set the font size, font color and background color for the message text used by the MSG_WINDOW command. The font and colors on the title bar of the message window are not affected by the MSG_WIN_OPT settings.
If a message window is not currently displayed, the MSG_WIN_OPT command sets the font size and color options that will be used by the MSG_WINDOW command. If a message window is currently displayed, the MSG_WIN_OPT command sets the font size and color options on the current message window.
Examples
MSG_WIN_OPT 2, 255
This formula sets the message text color to Red.
When this sample web page is already displayed on the message window, this command returns one of the following strings:
<html>
<title>Sample web page</title>
<body>
<p>This is <b>sample</b> text.</p>
</body>
</html>
setting |
format |
string returned by this command |
1 |
InnerText |
This is sample text. |
2 |
OuterText |
This is sample text. |
3 |
InnerHTML |
<p>This is <b>sample</b> text.</p> |
4 |
OuterHTML |
<body><p>This is <b>sample</b> text.</p></body> |