General information
Category:
Coding, syntax & commands
I can never remember what all the number options for message box are, so i wrote a prg that i can call thus
lclreturnval = lclmsg("INFO","O","MESSAGE BOX TEXT","ALERT")
"message box text" can be a string as above or a variable constructed from other variables
for you !
if you improve it - pls send me a copy
lclmsg.prg
parameters lcltype,lclbtns,lcltext,LCLCAPTION
** lcltype = "WARN" / "ERR" / "INFO" / "QUERY"
** lclbtns = ok 0 "O"
** = ok / cancel 1 "OC"
** = abort /retry / ignore 2 "ARI"
** = yes / no / cancel 3 "YNC"
** = yes / no 4 "YN"
** = retry / cancel 5 "RC"
LCLTYPE = UPPER(LCLTYPE)
LCLBTNS = UPPER(LCLBTNS)
LCLTEXT = PROPER(LCLTEXT)
** lclcaption = box title =
* "<< ALERT >>"
* lcltext = message text
*midnum = picture / type and btns
midnum = 0
if lcltype = "WARN"
MIDNUM = MIDNUM + 16
endif
if lcltype = "ERR"
MIDNUM = MIDNUM + 48
endif
if lcltype = "INFO"
MIDNUM = MIDNUM + 64
endif
if lcltype = "QUERY"
MIDNUM = MIDNUM + 32
endif
IF LCLBTNS = "O"
MIDNUM = MIDNUM + 0
ENDIF
IF LCLBTNS = "OC"
MIDNUM = MIDNUM + 1
ENDIF
IF LCLBTNS = "ARI"
MIDNUM = MIDNUM + 2
ENDIF
IF LCLBTNS = "YNC"
MIDNUM = MIDNUM + 3
ENDIF
IF LCLBTNS = "YN"
MIDNUM = MIDNUM + 4
ENDIF
IF LCLBTNS = "RC"
MIDNUM = MIDNUM + 5
ENDIF
LCLRTN = MESSAGEBOX(LCLTEXT,MIDNUM,LCLCAPTION)
RETURN LCLRTN
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only