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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I disable Foxpro Messages i.e. ZAP etc. 1

Status
Not open for further replies.

smsmail

Programmer
Aug 11, 2010
105
US
Hello Everyone,

I would like to disable all FOXPRO messages (i.e. ZAP, OVERWRITE) as my program is executing. How do I do this?

Thanks so much for your help!

SMSMAIL

 
Thanks Geoff,

Your help is very much appreciated!

Have a good day!

smsmail
 
You may not want SAFETY turned off for the entire program, so this saves the current value, temporarily changes the setting then returns it back to the prior value when desired.
Code:
lcSafety = SET("SAFETY")
SET SAFETY OFF
* place code here
SET SAFETY &lcSafety  && reset prior setting
 
You may not want SAFETY turned off for the entire program

Actually, I think it's a good idea to keep it off for the entire program (but perhaps not in the development environment).

The problem is that, if the user sees a prompt asking them to confirm that a file is about to be zapped or overwritten, the chances are that they will either panic, or simply say No because it seems like the right thing to do.

That means that your program won't do whatever it's supposed to be doing, which in turn could cause all kinds of problems down the track.

In short, it should be up to the programmer to decide when files can safely be deleted or overwritten, not the user.

Well, that's my humble opinion, for what it's worth.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Thanks Mike and dbMark,

By the way Mike, your advice have been greatly appreciated. Being new with FoxPro, I have learned so much using this forum. It is one that I definitely depend on.

Regards,
smsmail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top