How to: Create a Windows Application in 60 SecondsĀ 

It only takes a minute to create a J# application. Follow these steps and in a matter of seconds, you will have created a program that opens a window and reacts to a button press.

To create the Windows application

  1. On the File menu, point to New, and then click Project.

  2. Ensure the Windows Application template is selected, and in the Name field, type MyWindowsProject. Click OK to create the project.

    A Windows Form is displayed in the Windows Forms Designer. This is the user interface of your application.

  3. Open the View menu, and click Toolbox to make the list of controls visible.

  4. Drag a Label control to the middle of your form.

  5. From the Toolbox, drag a button onto the form, near the label.

  6. Double-click your button to open the Code Editor.

    Visual J# has inserted a method called button1_Click that is executed when the button is clicked.

  7. Change the method so it reads:

    private void button1_Click(object sender, EventArgs e)
    {
        label1.set_Text("Hello, World!");
    }
    
  8. Press F5 to compile and run your application.

    When you click on the button, the message "Hello, World!" is displayed. Congratulations! You've just written your first J# application.

See Also

Tasks

How to: Create a Console Application in 60 Seconds

Other Resources

Using Visual J# Express
Visual J# Express Development Environment Features
Visual J# Express Tips and Tricks
Visual J# Reference