Computer Science Canada MsgBox |
Author: | jacklarry [ Fri Mar 02, 2007 3:38 pm ] |
Post subject: | MsgBox |
How can you add a button in the message box? I want to add a button and change its caption to print. So that when i click on it...it will print the document. Could anyone please help? Thanx. |
Author: | jacklarry [ Sun Mar 04, 2007 11:21 am ] |
Post subject: | Re: MsgBox |
cud anyone plz tell me if it is possible? |
Author: | Ultrahex [ Sun Mar 04, 2007 11:36 am ] |
Post subject: | Re: MsgBox |
I do not know Visual Basic, So I am Unsure if you can or cannot; however, why not just make a... "Do You Want To Print?" with a yes and no ? or ... why not read: http://www.devcity.net/Articles/118/custom_msgbox.aspx (Other articles about Custom MsgBoxes If You Search "Custom MsgBoxes Visual Basic" On Google) |
Author: | cool dude [ Sun Mar 04, 2007 10:18 pm ] |
Post subject: | Re: MsgBox |
I got a good solution for you. Add another form. Shrink the form to the size of a message box. place a button on the form called print. Now it will act just like a message box! ![]() |
Author: | ToughRouge [ Fri Mar 09, 2007 9:10 am ] |
Post subject: | Re: MsgBox |
I'm pretty sure you can't just add a button to a MsgBox because it's a set command. If you want to add a button, you need to use a separate form instead and call it up. |
Author: | cool dude [ Fri Mar 09, 2007 4:26 pm ] |
Post subject: | Re: MsgBox |
ToughRouge @ Fri Mar 09, 2007 9:10 am wrote: I'm pretty sure you can't just add a button to a MsgBox because it's a set command.
If you want to add a button, you need to use a separate form instead and call it up. Is it just me or i said the same thing ![]() |
Author: | wargamer17 [ Wed Apr 11, 2007 8:30 pm ] | ||
Post subject: | Re: MsgBox | ||
Well, for a msgbox, you need to enter at least a prompt message the format for a msgbox is as follows: MsgBox(prompt[, buttons][, title][, helpfile, context]). So, for example:
That is all you need to do. For other buttons, follow this: Quote: vbOKOnly- Display OK button only. vbOKCancel- Display OK and Cancel buttons. vbAbortRetryIgnore- Display Abort, Retry, and Ignore buttons. vbYesNoCancel- Display Yes, No, and Cancel buttons. vbYesNo- Display Yes and No buttons. vbRetryCancel- Display Retry and Cancel buttons. vbCritical- Display Critical Message icon. vbQuestion- Display Warning Query icon. vbExclamation- Display Warning Message icon. vbInformation- Display Information Message icon. vbDefaultButton1- First button is default. vbDefaultButton2- Second button is default. vbDefaultButton3- Third button is default. vbDefaultButton4- Fourth button is default. vbApplicationModal- Application modal; the user must respond to the message box before continuing work in the current application. vbSystemModal- System modal; all applications are suspended until the user responds to the message box. |
Author: | jacklarry [ Thu May 17, 2007 5:08 pm ] |
Post subject: | RE:MsgBox |
alrite thnx guys |
Author: | MysticVegeta [ Tue Apr 01, 2008 6:41 pm ] |
Post subject: | Re: MsgBox |
Yo wargamer, im just curious, how would you detect if the user clicked Yes or no or cancel suppose we were to use vbYesNoCancel? |
Author: | CodeMonkey2000 [ Tue Apr 01, 2008 6:47 pm ] |
Post subject: | RE:MsgBox |
The msgBox will return a value to the form depending on what was clicked. |