DevX Skillbuilding for IBM DeveloperWorks
DevX Skillbuilding for IBM DeveloperWorks
DevX Skillbuilding for IBM DeveloperWorks
Get regular email alerts when we publish new features!
DevX Update for IBM developerWorks

More Newsletters
Binding DB2 Tables and Views to Visual Basic WinForms (cont'd)

Step 3: Setting up the main project form

To set up your main form, follow these steps:

  1. From your Employees project folder, select the Form1.vb project item.
  2. Right click on Form1.vb and select the Rename pop-up menu.
  3. Rename Form1.vb to Main.vb
  4. Double click Main.vb to open the form designer.
  5. In the Properties dialog, specify the value Main for the Name property.
  6. In the Properties dialog, specify the value Employees Launchpad for the Text property.
  7. In the Properties dialog, select the drop-down value FixedtoolWindow for the FormBorderStyle property.
  8. Right click on the Main project form and select View Code pop-up menu entry. This should display the code for Main.vb
  9. To the Main class definition, add the following declarations:

        Public frmViewEmployees As ViewEmployees
        Public frmManageEmployees As ManageEmployees

  10. From the editor's subroutine list, select the Main_Load subroutine and insert the following code in the routine:

    
            frmViewEmployees = New ViewEmployees()
            frmManageEmployees = New ManageEmployees()

  11. Save the project.
Previous Page: Step 2 : Adding the project forms Next Page: Step 4: Linking the ViewEmployees form
Page 1: Step 1 : Create the Visual Basic project Page 4: Step 4: Linking the ViewEmployees form
Page 2: Step 2 : Adding the project forms Page 5: Step 5: Linking the ManageEmployees form
Page 3: Step 3: Setting up the main project form