MsgFrameTitle
User dialog function.
The MsgFrameTitle function displays a message in a frame with a title.
Syntax
MsgFrameTitle (<frame_title>,<Text>,<Id>,[<x>],[<y>],[<size>][,<color>])
or
ret=MsgFrameTitle (<frame_title>,<Text>,<Id>,[<x>],[<y>],[<size>][,<color>])Parameters
<frame_title>, string to be displayed as the title of the frame. It can be a constant or a variable.
<Text>, string to be displayed, constant or variable. The current font and size are used to display the <text>. The <text> is automatically displayed in the middle of the frame. If the <text> is too long, it's displayed on several lines unless no spaces are included in <text>. You can force a line feed by including \n\ in your <text>.
<Id>, integer, identifier of this specific message. It can be a constant or a variable.
<x>,<y>, optional coordinates of the left-top point of the rectangle containing the message; if these parameters are not specified, the message is displayed in the middle of the screen. If these parameters would cause part of the rectangle to be displayed off-screen, the rectangle is automatically displayed at the top-left.
Instead of specifying coordinates, those keywords can be used:
<x> can be replaced by Left, Center or Right keyword
<y> can be replaced by Top, Center or Bottom keyword
<size>, optional integer, size of the font used to display the message (default value : 12).
<color>, optional integer, color of the text; the default value is black. Red is: 255, green is 65280, blue is 255 x 65536, white (sum of these three colors): 255 + (255x256) + (255x65536) = 16,777,215. If red, green and blue are the index of each color from 0 to 255, <color> is:
red+(green*256) + (blue*65536).Return value
Ret, numeric return code. When the message frame is display successfully, the function returns 0, otherwise use this return code for Error Handling.
Remarks
When the script ends, all the messages are removed.
You can also remove them by using the RemoveFrame function.
If you want to display the & character, you need to double it: msgframetitle("Title frame","A && B",1)
Examples
MsgFrameTitle("Login","Please wait",1) ' Displays the text "Please wait" in the frame with the title "Login"
MsgFrameTitle("Login","Please wait",1,Center,Center) ' Displays the text "Please wait" in the frame with the title "Login" in the middle of the screen
MsgFrameTitle("Your userid is: "+name$,"Please wait",1,Center,Center) ' Displays the text "Your userid: " concatenated with the content of name$.