1. Create a new project of type Windows Forms Application in
the same location as
2. Click OK to create the project. You should see an empty Windows
form. Move the mouse pointer
to the Toolbox bar on the left of the screen, then to the
Button entry of the All Windows Forms
tab, and double-click the entry to add a button to the main
form of the application (Form1).
3. Double-click the button that has been added to the form.
4. The C# code in Form1.cs should now be displayed. Modify
it as follows :
private void button1_Click(object sender, EventArgs e)
{
MessageBox.Show("Hello
World");
}
5. Run the application.
6. Click the button presented to open a message dialog box,
as shown in Figure
7. Click OK, and then exit the application by clicking the X
in
the top-right corner, as per standard Windows applications.
No comments:
Post a Comment