4.1. Your First VB.NET Project: Hello, World

To introduce you to some of #develop's features, we'll create the classic example program - "Hello, World". This example will be written using the VB.NET language.

To create the new program:

  1. Select the File, New Project... menu:

  2. From the new project screen, select the VBNET category on the left, and choose the VB forms application template. Type a name for your new project (MyHelloWorldVB), and select a Location:

    Tip

    #develop can automatically create a project and source directory for you. Just tick the checkboxes in the new project dialog.

  3. #develop creates a default set of files for your new project. You can view all the files it creates by expanding the Combine and ??? in the Project Scout at the left-hand side of the IDE, and double-clicking the individual files. For now, double-click the MainForm.vb file. This will open the file in the right-hand area of the IDE and allow you to view and edit the code.

  4. Now let's enter the code to show a messagebox with our standard text message: "Hello, World!". Type the following code into the Public Sub New declaration:

    MessageBox.Show("Hello, World!")

    Your MainForm.vb should look like this (the inserted code is selected):

  5. OK, let's build our solution and see if we typed the line correctly! Select the Run menu, and Build Combine

    Tip

    Hotkey: F8 to Build your Combine

  6. Check the results of your Build in the Output window in the bottom-right corner of the #develop IDE.

  7. Everything looks OK! Lets run our program using the Run menu's Run item:

    Tip

    Hotkey: F5 to Run your Combine

  8. Success!