Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messagebox - STOP

Tips -N- Tricks

Messagebox - STOP

by  jimoo  Posted    (Edited  )
* By Jim Osieczonek, www.deltbg.com

#IF .F.

Works with versions 5.0 and up.

Easy to use STOP messagebox. Brings up the correct ICON and title.
SAVE this procedure as one of your public methods in your classlib OR procedure file.

SEE FAQ - MESSAGEBOX YESNO for more details.

#ENDIF

PUBLIC tcSystem
tcSystem = "Tek Tip"
STOP("You just encountered an error.")

*******************************************************************************
PROCEDURE STOP
LPARAMETER tcMessage,tcTitle
IF PCOUNT() = 0
tcMessage = "Duh... No Message Passed"
ENDIF

IF TYPE('tcMessage') = 'C'
IF TYPE('tcTitle') = 'C'
* fall thru on character types
ELSE
* invalid data type for this function
tcTitle = tcSystem
ENDIF
ELSE
tcMessage = "INVALID MESSAGE PASSED INTO BASE CLASS!"
tcTitle = tcSystem
ENDIF


RETURN MESSAGEBOX(tcMessage,0 + 16,m.tcTitle)
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top