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

MessageBox

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Can we write code to have more then one button in a message box and to track which is being clicked.
 
There are many way you can make messagebox function work as you want. It's general sint. is:

?messagebox('message you want to display, ;
box_qualifiers, ;
'box title')

NOTE: remember ; indicates that the command, function, etc. continues in the next line.

It seems that u're mainly interested in box_qualifiers. You may use 3 operands here:

op1: 0-5 - number/type of buttons (try them out!)

op2: 16, 32, 48 or 64, any of these values, representing an icon that appears in the messagebox (stop, question mark, exclamation mark, information, respect.)

op3: 0, 256 or 512, any of thes values, indicating which is the default button (1st, 2nd, 3rd respect.)

For example, you can compose the following box_qualifier:

4+32+0

which gives you two buttons, Yes/No, a question mark, and 1st button (Yes) as default button.

In other words:
?messagebox('Your matter...', 4+32+0, 'Your title...')

You can try it out at the Command window. The funtion's result is send to VFP main window.

Take a further look @ VFP/MSDN Take away all the buzz of this biz and what do you get? 01000100101010...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top