IPB

Welcome Guest ( Log In | Register )



Tags
This content has not been tagged yet
2 Pages V   1 2 >  
Reply to this topicStart new topic

Msgbox

, Here is a simple way and lists of MsgBoxes.

MarCrush
no avatar
Super Member
*********
Group: Members
Posts: 203
Joined: 2-June 05
From: Why would you want to know?
Member No.: 7,778



Post #1 post 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.
Go to the top of the page
+Quote Post
munim
no avatar
Newbie [Level 1]
*
Group: Members
Posts: 15
Joined: 14-April 05
From: Bangalore
Member No.: 5,654



Post #2 post 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.
Go to the top of the page
+Quote Post
Raptrex
no avatar
Super Member
*********
Group: Members
Posts: 293
Joined: 14-August 04
Member No.: 808



Post #3 post Jun 4 2005, 01:12 PM
doesnt msgbox just pop up with those text?
Go to the top of the page
+Quote Post
MarCrush
no avatar
Super Member
*********
Group: Members
Posts: 203
Joined: 2-June 05
From: Why would you want to know?
Member No.: 7,778



Post #4 post 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.
[right][snapback]147584[/snapback][/right]


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.
Go to the top of the page
+Quote Post
lava.alt
no avatar
Advanced Member
*******
Group: Members
Posts: 125
Joined: 11-May 05
Member No.: 6,903



Post #5 post 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.
[right][snapback]147540[/snapback][/right]


i think this guy is only tryin yo get some points
Go to the top of the page
+Quote Post
TPFWebmaster
no avatar
Newbie [Level 1]
*
Group: Members
Posts: 13
Joined: 15-September 05
Member No.: 11,892



Post #6 post 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.
[right][snapback]147584[/snapback][/right]


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
Go to the top of the page
+Quote Post
sonorama
no avatar
Premium Member
********
Group: Members
Posts: 197
Joined: 3-April 05
From: Cuernavaca, Mexico
Member No.: 5,226



Post #7 post 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
[right][snapback]159578[/snapback][/right]

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
Go to the top of the page
+Quote Post
alicabektas
no avatar
Member [Level 3]
******
Group: Members
Posts: 91
Joined: 6-September 05
From: Bosnia
Member No.: 11,564



Post #8 post Sep 26 2005, 08:35 AM
My advice :

using tutorial for VB or Book

and have example

happily biggrin.gif biggrin.gif

Go to the top of the page
+Quote Post
dul
no avatar
Member [Level 1]
****
Group: Members
Posts: 73
Joined: 21-September 05
Member No.: 12,113



Post #9 post 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.
Go to the top of the page
+Quote Post
NTD2885
no avatar
Newbie
*
Group: Members
Posts: 5
Joined: 15-November 05
From: Vietnam
Member No.: 14,327



Post #10 post 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
Go to the top of the page
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic

Collapse

> Similar Topics

    Topic Title Replies Topic Starter Views Last Action
No New Posts 3 whitewind 1,378 24th November 2005 - 02:40 PM
Last post by: Inspiron


 



RSS Lo-Fi Version Time is now: 5th December 2008 - 03:06 AM