Edited by velma, 01 August 2011 - 08:33 AM.
| |
|
Welcome to KnowledgeSutra - Dear Guest | |
Msgbox
Started by MarCrush, Jun 04 2005 04:51 AM
19 replies to this topic
#4
Posted 11 July 2005 - 02:25 AM
MarCrush, on Jun 4 2005, 04:51 AM, said:
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.
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
#5
Posted 26 September 2005 - 07:23 AM
munim, on Jun 4 2005, 12:03 PM, said:
here is the code for a yes/no/cancel msgbox
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
#9
Posted 15 November 2005 - 04:55 PM
MarCrush, on Jun 4 2005, 04:51 AM, said:
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.
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
#10
Posted 17 November 2005 - 05:46 AM
dul, on Oct 19 2005, 06:38 PM, said:
the visual basic 6's MsgBox class is a wrapper for the MessageBoxA WinAPI call. I think it fills in something like this:
MsgBox "Some text", "a title"and replaces it with:
MessageBox(NULL, "Some text", "a title", NULL);
the msdn documentation for MessageBoxA says:
Quote
int MessageBox(
HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType
);
HWND hWnd,
LPCTSTR lpText,
LPCTSTR lpCaption,
UINT uType
);
hope this clears up some questions with the MsgBox class.
Reply to this topic

1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users















