Small program example.

Hello, today I will show you how to display text in a message box.

Firstly, start a new project and call it hello world again.

Click on the Form in the middle and go to the properties of your form and change the text property to “Hello World”

Go to your toolbox and add a label to the form in the middle and change it’s text property to “Hello World”

Add a button and change it’s text property to “Display” and its Name property to “btnDisplay”.

Double click your button and in between this:

{

}

Type

MessageBox.Show("Hello World");

After you have done that, click the run at the top of the program and click on your Display button, it should popup a message box 
displaying "Hello World"


You have created a small programd that sends the words "Hello World" to a messagebox!

Leave a comment