Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
* request the user's password (and return it uppercased)
 
Def = ""
 
Def<MTEXT$> = "Enter your password:"
 
Def<MTYPE$> = "RCE"
 
Def<MICON$> = "?"
 
Def<MMASKINPUT$> = TRUE$
 
 
 
Password = Msg(@window, Def)
 
if Password = char(27) then
 
   * user escaped from the message
 
end else
 
   * user supplied password (which could be null) and pressed enter
 
end

 

 

Example 2

Code Block
* display a message stored in the repository as "ERROR_MESSAGE"
 
Text = "An error occurred opening the table for processing."
 
Msg(@window, Text, "ERROR_MESSAGE")

 

...

Example 3

Code Block
* display a message while batch processing
 
Def = ""
 
Def<MTEXT$> = "Processing..."
 
Def<MTYPE$> = "U"
 
* display the processing message and do the processing
 
MsgUp = Msg(@window, Def)
 
gosub BatchProcess
 
* take down the processing message
 
Msg(@window, MsgUp)

 

...

Example 4

Code Block
/* display a gas gauge to show progress while processing 1000 orders */
 
$insert msg_equates
 
OrderCnt = 1000
 
Def = ""
 
Def<MCAPTION$> = "Processing Orders..."
 
Def<MTYPE$   > = "GC"
 
Def<MEXTENT$ > = OrderCnt
 
Def<MTEXTWIDTH$ > = 400
 
MsgUp = Msg(@window, Def)
 
for Order = 1 to OrderCnt
 
    /*  process the order */
 
    * update the gauge and check if cancel was pressed
 
while Msg(@window, MsgUp, Order, MSGINSTUPDATE$)
 
next Order
 
/*  we are done, take down the gas gauge */
 
Msg(@window, MsgUp)         ;* take down the gauge

 

...

Example 5

Code Block
* logon processing with a batch screen
 
Def = ""
 
Def<MTYPE$> = "TA5"
 
* display 5-second splash-screen while performing login processing
 
Msg(@window, Def, "SPLASHSCREEN")
 
gosub Logon_Process
 
* allow the message to close if 5 seconds have elapsed
 
Yield()
 
gosub Setup