Home > Language Reference > User Dialog Functions > MsgFrameTitle


The MsgFrameTitle function displays a text in a titled frame.


Used to display information at a point in a script without any user intervention.


ret=MsgFrameTitle(<frame_title>, <text_frame>, <id_frame> [, <x> , <y>] [, <size>][, <color>])


<frame_title>, string, title of the frame.

<text_frame>, string, text to display in the frame. <text_frame> is displayed using current font. The string is automatically displayed in the middle of the frame. If <text_frame> is too long, it is displayed on several lines unless no spaces are included in <text_frame>. You can force a line feed by including \n\ in <text_frame>. To display a number, convert it first to a string using Str$ function (see the example below).

<id_frame>, integer, identifier of the frame. 

, optional, integers, coordinates of the topleft point of the frame. If omitted, the frame is displayed in the middle of the screen. Instead of specifying coordinates, those keywords can be used:

<size>, optional, string, font size (default is 12). 

<color>, optional, integer, text color. De0fault 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, optional integer. If the function succeeds, the return value is 0. If the function fails, the return value is a nonzero value.


When the script ends, all the frames are removed.

You can remove a frame at a point in the script using the RemoveFrame function.

If you want to display the & character, you need to double it:
msgframe("A && B",1)


See also



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 is: " 
'concatenated with the content of name$.