MarCrush
Jun 4 2005, 04:51 AM
Here are lists of MsgBoxes: Syntax: MsgBox Prompt, MsgBoxStyle, Title, HelpFile MsgBox "Uh, text!", , "Uh, Title!" MsgBox "Uh, text!", vbCritical, "Uh, Title!" MsgBox "Uh, text!", vbExclamation, "Uh, Title!" MsgBox "Uh, text!", vbInformation, "Uh, Title!" MsgBox "Uh, text!", vbOKCancel, "Uh, Title!" MsgBox "Uh, text!", vbQuestion, "Uh, Title!" MsgBox "Uh, text!", vbYesNo, "Uh, Title!" MsgBox "Uh, text!", vbYesNoCancel, "Uh, Title!" MsgBox "Uh, text!", vbRetryCancel, "Uh, Title!" MsgBox "Uh, text!", vbOKOnly, "Uh, Title!" MsgBox "Uh, text!", vbAbortRetryIgnore, "Uh, Title!" MsgBox "Uh, text!", vbMsgBoxHelpButton, "Uh, Title!", "C:\HelpFile.hlp" You can also combine them: MsgBox "Uh, text!", vbExclamation + vbYesNoCancel, "Uh, Title!" This is great for noobs.
Reply
munim
Jun 4 2005, 06:33 AM
hmm.. maybe you could post how to code what happens when each button is pressed (incase there is more than the OK button).. i don't use too much of VB myself.. C#.net is nice.
Reply
Raptrex
Jun 4 2005, 01:12 PM
doesnt msgbox just pop up with those text?
Reply
MarCrush
Jun 4 2005, 02:12 PM
QUOTE(munim @ Jun 3 2005, 11:33 PM) hmm.. maybe you could post how to code what happens when each button is pressed (incase there is more than the OK button).. i don't use too much of VB myself.. C#.net is nice. If you do this, each button will be different BUT only for two button (<> vbCancel means the command for OK): CODE If MsgBox("Uh, Text!" vbInformation + vbOKCancel, "Uh, Title) <> vbCancel Then Form1.Load End If There should be more helpful for noobs and how to do commands with them. Yes they do bring up a dialog with text but you can also do more with them like confirmations.
Reply
lava.alt
Jul 11 2005, 02:25 AM
QUOTE(MarCrush @ Jun 4 2005, 04:51 AM) Here are lists of MsgBoxes: Syntax: MsgBox Prompt, MsgBoxStyle, Title, HelpFile MsgBox "Uh, text!", , "Uh, Title!" MsgBox "Uh, text!", vbCritical, "Uh, Title!" MsgBox "Uh, text!", vbExclamation, "Uh, Title!" MsgBox "Uh, text!", vbInformation, "Uh, Title!" MsgBox "Uh, text!", vbOKCancel, "Uh, Title!" MsgBox "Uh, text!", vbQuestion, "Uh, Title!" MsgBox "Uh, text!", vbYesNo, "Uh, Title!" MsgBox "Uh, text!", vbYesNoCancel, "Uh, Title!" MsgBox "Uh, text!", vbRetryCancel, "Uh, Title!" MsgBox "Uh, text!", vbOKOnly, "Uh, Title!" MsgBox "Uh, text!", vbAbortRetryIgnore, "Uh, Title!" MsgBox "Uh, text!", vbMsgBoxHelpButton, "Uh, Title!", "C:\HelpFile.hlp" You can also combine them: MsgBox "Uh, text!", vbExclamation + vbYesNoCancel, "Uh, Title!" This is great for noobs. i think this guy is only tryin yo get some points
Reply
TPFWebmaster
Sep 26 2005, 07:23 AM
QUOTE(munim @ Jun 4 2005, 12:03 PM) hmm.. maybe you could post how to code what happens when each button is pressed (incase there is more than the OK button).. i don't use too much of VB myself.. C#.net is nice. here is the code for a yes/no/cancel msgbox CODE ync = MsgBox("Click on yes or no or cancel", vbYesNoCancel + vbQuestion, "Title") If ync = vbYes Then 'code goes here ElseIf ync = vbNo Then 'code goes here ElseIf ync = vbCancel Then 'code goes here End If
Reply
sonorama
Sep 26 2005, 07:46 AM
QUOTE(lava.alt @ Jul 10 2005, 08:25 PM) i think this guy is only tryin yo get some points Lol, I really don't think he's trying only to get credits, but i can't find his post useful anyway... CheerS!!
Reply
alicabektas
Sep 26 2005, 08:35 AM
My advice : using tutorial for VB or Book and have example happily
Reply
dul
Oct 20 2005, 02:38 AM
Yes. iT IS GOOD. bUT YOU KNOW, IT IS simple version of WinAPI's mESSAGEBoX function. MessageBox has got more possibilities.
Reply
NTD2885
Nov 15 2005, 04:55 PM
QUOTE(MarCrush @ Jun 4 2005, 04:51 AM) Here are lists of MsgBoxes:
Syntax: MsgBox Prompt, MsgBoxStyle, Title, HelpFile
MsgBox "Uh, text!", , "Uh, Title!" MsgBox "Uh, text!", vbCritical, "Uh, Title!" MsgBox "Uh, text!", vbExclamation, "Uh, Title!" MsgBox "Uh, text!", vbInformation, "Uh, Title!" MsgBox "Uh, text!", vbOKCancel, "Uh, Title!" MsgBox "Uh, text!", vbQuestion, "Uh, Title!" MsgBox "Uh, text!", vbYesNo, "Uh, Title!" MsgBox "Uh, text!", vbYesNoCancel, "Uh, Title!" MsgBox "Uh, text!", vbRetryCancel, "Uh, Title!" MsgBox "Uh, text!", vbOKOnly, "Uh, Title!" MsgBox "Uh, text!", vbAbortRetryIgnore, "Uh, Title!" MsgBox "Uh, text!", vbMsgBoxHelpButton, "Uh, Title!", "C:\HelpFile.hlp"
You can also combine them: MsgBox "Uh, text!", vbExclamation + vbYesNoCancel, "Uh, Title!"
This is great for noobs.
Thankx, you can use number , for exam: 16 = vbCritical
Reply
Latest Entries
Trap FeedBacker
Nov 26 2007, 01:11 PM
How do I change the text of a msgbox button, because I'm using them to open to different form. For example. I'll have the message box sayin "What would to like to do next?" Then ideally I want two buttons with the text "View Accounts" on one and "Finish" on the other?
Reply
Galahad
Nov 22 2005, 11:00 AM
Hi You can do as Inspiron said,make a whole new form,and place controls as you like them. I was never good in subclassing,but I believe changing button captions can be done using subclassing.I would love to give the example,but as I said,I'm no good with subclassing.As always,I direct people to use the web,Yahoo or Google a bit,and dig out some information that is of interest to you.Because,nothing can stick in peoples minds better,than hard way of finding some info out.Check Planet Source Code ( http://www.planet-source-code.com/vb/) for examples on MsgBox usage,maybe there are some of customizing this function. Cheers
Reply
Inspiron
Nov 19 2005, 02:29 PM
You can change the caption, or the title, of any messagebox. The only thing you cannot change is the text of the buttons in a messagebox. However if you want to have a customised button text, you can make another form that opens as a dialog, to imitate the effects of a messagebox. This way, not even you can customise the button text of the messagebox, you can also add background pictures, sound effects, colors, and even add a customised icon. Basically just treat the form as a messagebox and customise it..
Reply
markcqm
Nov 19 2005, 01:44 PM
Could we change buttom "YES","NO","CANCEL" to other caption?
Reply
sharpz
Nov 17 2005, 08:24 AM
yes, the windows.forms.messagebox.show is also a wrapper for the MessageBoxA API call i beleive. it is basically the same as Visual Basic 6.0's MsgBox function, just a slightly different syntax. I never bothered with vb.net because c++ is just still alot better for directly accessing memory... however, if managed code becomes the new standard, i guess i would do .net btw, MessageBoxButtons.OK and etc. are just constants representing hex code that is defined in some windows header that is included when you compile.
Reply
Recent Queries:--
how to change text of msgbox in vb6 - 1.00 hr back.
-
vb6 how to change text of msgbox - 2.28 hr back.
-
vba msgbox syntax text - 3.51 hr back.
-
msgbox.confirm vb.net - 4.26 hr back.
-
vbexclamation yesnocancel - 5.62 hr back.
-
vb.net button caption msgbox - 7.29 hr back.
-
c#.net prompt messagebox - 8.76 hr back.
Similar Topics
Keywords : msgbox, simple, lists, msgboxes
- How To Customize Msgbox?
(3)
Looking for msgbox, simple, lists, msgboxes
|
|
Searching Video's for msgbox, simple, lists, msgboxes
|
advertisement
|
|