|
|

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:
- From your Employees project folder, select the Form1.vb project item.
- Right click on Form1.vb and select the Rename pop-up menu.
- Rename Form1.vb to Main.vb
- Double click Main.vb to open the form designer.
- In the Properties dialog, specify the value Main for the Name property.
- In the Properties dialog, specify the value Employees Launchpad for the Text property.
- In the Properties dialog, select the drop-down value FixedtoolWindow for the FormBorderStyle property.
- Right click on the Main project form and select View Code pop-up menu entry. This should display the code for Main.vb
- To the Main class definition, add the following declarations:
Public frmViewEmployees As ViewEmployees
Public frmManageEmployees As ManageEmployees
- 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()
- Save the project.
|
|
|
|