Navigation:  Reference > Commands >

Display Windows Message Box

Print this Topic Previous pageReturn to chapter overviewNext page

 

Use this command to display a message using the standard Windows message dialog box.

 

MSG f/c/e Required - This is the message you want to display on the screen.  It can be any type of field or expression.  The program will convert it automatically to a string.

 

WINDOWS f/c/e  By setting this value to 'info', 'conformation', 'error' or 'warn'  the program will display a dialog box with an information icon or with a warning icon.  The information icon is the default.

 

       NOTE:  Only the first character matters, i.e., 'I' Information ,'C', Confirmation  'E' Error, or 'W' Warning.

 

CAPTION f/c/eYou can replace the caption of the box using this option.  If you don't specify a caption the word "Information" will be displayed if this is an information message or "Warning" if it's a warning message..

 

 

 

EXAMPLE

The code below will display the sample dialog box.

 

//test UDF

 

#udx

#ForceRWN

 

define x type n

 

START:

  x = user_func(1,3,'A')

  msg 'X: '+x

  quit

  ret

 

define y,z,a type n

define do type a size 1

func user_func y,z,do

   if do = 'A'

       a = y+z

   else_if do = 'S'

       a = y-z

   else_if do = 'M'

       a = y*z

   else_if do = 'D'

       a = y/z

   endif

   ret a

 

 

The above is a complete program.  The result, once compiled and run, would be:

 

               

 

 


Page url: http://www.cassoftware.com/tas/manual/displaywindowsmessagebox.htm