Rated
Read 92,337 times
Contents
Related Categories
MsgBox Function - Parameters
Parameters
The message box function takes 3 main parameters:
Msgbox Prompt, Buttons+Icon, DialogTitle
Prompt is a string which contains the message. Buttons+Icon use the following
constants for Buttons:
|
Constant
|
| vbOKOnly |
| vbOkCancel |
| vbYesNo |
| vbYesNoCancel |
| vbAbortRetryIgnore |
| vbRetryCancel |
And the following constants for Icons
|
Constant
|
Icon
|
| vbQuestion |
|
| vbInformation |
|
| vbExclamation |
|
| vbCritical |
|
James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.
Comments
-
Posted by forvihang on 17 May 2005
hi,
is it possible to have something which will display the information (information is one or two lines of text) for few seconds and disappear. if i use msgbox for it, there are many message boxes i... -
Posted by JLG2000 on 18 Mar 2005
I get the following error:
[code]It is invalid to show a modal dialog or form when the application is not running in UserInteractive mode. Specify the ServiceNotification or DefaultDesktopOnly styl... -
Posted by khurem on 12 Apr 2004
Hello
dear i dont know how i can add icons in menu bar in visual basic .
plaease help me to solve this problem.
khuram
Posted by HyperHacker on 21 Apr 2003
No, you need to make a new form that looks like a message box for that. :p -
Posted by tauro_fuerte on 08 Oct 2002
[blue]Dim[/blue] ans [blue]As String[/blue]
ans = MsgBox("Would you like to save changes?", vbYesNoCancel)
[blue]If[/blue] ans = vbYes [blue]Then[/blue]
[green]'Put your Yes commands in here[/gree...
|