Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Messagebox
Message
 
 
To
08/06/2009 23:48:47
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01404626
Message ID:
01404671
Views:
46
>>I have create "print .scx" and I have written code, now I want before the printing the Message Box will appear and ask "DO YOU WANT TO PRINT" YES OR NO. if yes I want print the record, if no means exit from print form.
>>
>>How to write code?

>Hi Muthu.
>
>All you need to do is wrap your printing code in something this -
>
>if MessageBox("Do you want to print?", 4+32+256, "Confirm Print") == 6
>Printing Code here
>EndIF
>
>If you want it to default to Yes then leave the +256 out.
>
>Ian Simcock.
>

Better yet, include FOXPRO.H, use MB_YESNO, MB_DEFBUTTON2, and IDYES and leave the magic numbers out of it. It works the same either way but which is more readable?
Previous
Reply
Map
View

Click here to load this message in the networking platform