Basic tutorial and creating a Message Box to send to you run off an event.
Hey guys,
Today I am going to teach you how to create a message box in VB.NET. In this tutorial you will learn to create a message box and re send it when you click a button.
Okay so we begin by creating a new Windows Form Application template. Place a button on this form and change the name to cmdResend. Now our form is set up, put the button anywhere add anything you want to make it look pretty.
Now we want the message box to open on load. So double click the form and you should be put in the Form1_Load event if not, select it from the combo box at the top of the window.
Now need to create a new Message Box and we need to do this.
MsgBox
That is how we address the message box. Now we need to have something on it so when it loads it is not a blank message box.
MsgBox(”Hello world!, 0)
That will actually be a good piece of code. That is all we need to call it. But there are a few add-ons to make it a bit more professional. Now here is a bit more advanced code.
MsgBox(”Hello world!, MsgBoxStyle.Exclamation,”Hello!”)
Now we have launched a MsgBox with an Exclamation ‘image’ that shows like an error. It will display “Hello world!” now that piece at the end, that is the heading or title for the message box. Like how you are viewing this as “Internet Explorer” or “Mozilla Firefox”. Like that. So now we have this running, you can copy this code and use it as your own and run it off of other events.
Thank you, hope I helped,
Fizzle Group













Fri, Jan 9, 2009, by Fizzle Group
Browsers