Message box question

  • Thread starter Thread starter MadCrazyNewbie
  • Start date Start date
M

MadCrazyNewbie

Hey Group,

Hows you all doing?

I wonder if somebody could be kind enought to point me in the direction of a
link on how to use Message Box's basically I want to have a message box pop
up with 3 boxs in, A, B, and Cancel.

Cheers
MCN(Si)
 
Hey MCN...

Am somewhat of a VB.NET newb myself, but I think what you're after is :

MessageBox.Show("your text in here")

you can concatenate stuff together with the ampersand (&), so
MessageBox.Show("Hello " & "MSN"), or with variables. For multiple boxes I
have no idea tho... :)

Hope this helps

FF
 
This should make it very clear, I just wrote this two minutes ago. - HTH OHM

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click

Select Case MessageBox.Show("Choose Yes,No,Cancel", "My Message Box
Caption", MessageBoxButtons.YesNoCancel)

Case DialogResult.Yes
Debug.WriteLine("User chose YES")

Case DialogResult.No
Debug.WriteLine("User chose NO")

Case DialogResult.Cancel
Debug.WriteLine("User chose CANCEL")


End Select

End Sub
 
Fastforward,

Thanks for your reply, im after something like:-

Messagebox.Show("A, B , Cancel)
If A Then ............
If B Then ............
If Cancel Then ...........

Just don`t quite know how to do the coding properly:(

Cheers
MCN
 
MadCrazyNewbie said:
I wonder if somebody could be kind enought to point me in the direction of a
link on how to use Message Box's basically I want to have a message box pop
up with 3 boxs in, A, B, and Cancel

(forgot to add, look into Dialogs - sounds to me like MessageBox will be too
limited for what you're after)

--
FastForward
PhD Student, Human Computer Interaction (HCI)
London, England

online since '85, MCSE '98 but I don't normally admit it in public ;)
status : newbie VB coder building webradio app in .NET2003
 
One Handed Man ( OHM#) said:
This should make it very clear, I just wrote this two minutes ago. - HTH
OHM

OHM - nice one - you just taught me dialogs in a few lines of code. Can I
be your padawan? :)

FF
 
No problems. I'm not entirely sure what one is, but I think its something to
do with star wars !?!

Regards - OHM
 
* "MadCrazyNewbie said:
Hows you all doing?

I wonder if somebody could be kind enought to point me in the direction of a
link on how to use Message Box's basically I want to have a message box pop
up with 3 boxs in, A, B, and Cancel.

You cannot easily change the captions of the buttons shown in the
messagebox, so it will be easier to implement the messagebox on your
own.

My FAQ:

For the system icons:

Have a look at the 'SystemIcons' class.

For the system sounds:

\\\
Private Declare Auto Function MessageBeep Lib "user32.dll" ( _
ByVal wType As Int32 _
) As Boolean

Private Const MB_ICONASTERISK As Int32 = &H40 ' Information.
Private Const MB_ICONEXCLAMATION As Int32 = &H30 ' Ausrufezeichen.
Private Const MB_ICONHAND As Int32 = &H10 ' Stopschild.
Private Const MB_ICONQUESTION As Int32 = &H20 ' Fragezeichen.
Private Const MB_OK As Int32 = &H0 ' Standard-OK.
///

Usage:

\\\
MessageBeep(MB_ICONHAND)
///

Notice that Windows' messagebox supports copying its contents to the
clipboard by pressing Ctrl+C.
 
Hi Herfried,

I had to read it 3 times, however good answer in addition to OHM, when you
add that as well, than it even a better message.

:-)

Cor
 
Back
Top