Jul 20, 2008

Msgbox - Here is a simple way and lists of MsgBoxes.

Free Web Hosting, No Ads > CONTRIBUTE > Computers > Programming Languages > VB Programming
Pages: 1, 2

free web hosting

Msgbox - Here is a simple way and lists of MsgBoxes.

MarCrush
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
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
doesnt msgbox just pop up with those text?

Reply

MarCrush
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
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
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
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!! rolleyes.gif

Reply

alicabektas
My advice :

using tutorial for VB or Book

and have example

happily biggrin.gif biggrin.gif


Reply

dul
Yes. iT IS GOOD. bUT YOU KNOW, IT IS simple version of WinAPI's mESSAGEBoX function. MessageBox has got more possibilities.

Reply

NTD2885
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

iGuest
add Show details in message box.
Msgbox

How can I add Show details in Message box. Please anyone help me to do...

-reply by Vijee

Reply

iGuest
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
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
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
Could we change buttom "YES","NO","CANCEL" to other caption?

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. c# change messagebox buttons text - 18.92 hr back. (1)
  2. msgbox yes or cancel in vb.net - 27.99 hr back. (1)
  3. msgbox usage - 28.63 hr back. (1)
  4. vb.net "customize msgbox" - 30.53 hr back. (1)
  5. c# messagebox yes no - 36.90 hr back. (1)
  6. msgbox combine vb.net - 42.04 hr back. (1)
  7. vb.net max chacters on inputbox - 42.52 hr back. (1)
  8. msgbox synatx yes no cancel - 44.36 hr back. (1)
Similar Topics

Keywords : msgbox, simple, lists, msgboxes

  1. How To Customize Msgbox?
    (3)


      Looking for msgbox, simple, lists, msgboxes

Searching Video's for msgbox, simple, lists, msgboxes
advertisement



Msgbox - Here is a simple way and lists of MsgBoxes.



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE