Developer Defined Button in Message Box

Shaitan00
07-18-2003, 10:01 AM
I need to modify the standard message box so that 3 options are available: Yes, No, Print Preview. Note that “Print Preview” is not a standard message box command name. Afterwards how do I capture the response? (i.e.: if response = “Print Preview” then …) or something along those lines.

Is this possible? If not what is my alternative?

ImmortalWarrior
07-18-2003, 10:04 AM
I don't have any idea whether or not its possible, but an alternative would be to make your own MessageBox control and pass the chosen value back to the app.
Matt

Benzakhar
07-18-2003, 10:09 AM
Thats easy. Put this function into a module and create a form with the buttons and how you want the msgbo to look.

public function MyMsgBox(F1 as form, f2 as form)
f1.show vbmodal, f2 ' shows a and stops all executions until the form is closed
mymsgbox=f1.tag
end function

make command buttons and when you click the command button make the forms tag be a number e.g. if ok is pressed the the tag would be 1 else 0 or what you want.

so you could do this

dim r as lon
r=mymsgbox(msgoboxform, me)

Hope that helps!

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum