Message Box

TheRookie

Member
Joined
Sep 15, 2005
Messages
9
Programming Experience
Beginner
Message Box - RESOLVED

dHow do I add an exclamation point and "ok", to my message box through this code:

MessageBox.Show("Invalid Input", ControlChars.NewLine. & ex.Message)


Thanks,
 
Last edited:
Well, for starters, you had your "invalid input" as the message, and the error message as the caption (and with a CRLF in front of it to boot.)

Made somechanges, but to answer your question, the next two parameters indicate the buttons and the icons displayed.

VB.NET:
MessageBox.Show(  ex.Message,"Invalid Input", MessageBoxButtons.OK,MessageBoxIcon.Exclamation )

-tg
 
Back
Top