Visual
Basic™ Framework
|
Software
Engineering: Simple Payroll Program |
[ Previous ] [ Quick
Start Index ] [ Next ]
Completing
the Quick Start program
This is the final step in completing the Quick Start program. You will add a ‘Quit’ button and save the project into your directory.
1. Add a command button to terminate the program.

|
|
|
|
|
Ø From the Toolbox, select the Command Button tool. Ø In the form, draw the command button. Ø Change the button’s caption to ‘Quit’. Change the button’s (Name) to ‘Quit’. |
2. For this control of ‘Quit’ button, add the statement ‘End’ into the Click event procedure.
|
Object: ‘Quit’ - Procedure ‘Click’ |
|
Private Sub Quit_Click()
End End Sub |
3. Save the Project into your directory by selecting ‘Save Project As’ from the File menu.
4. Test
again your program by clicking the Run icon
on the Toolbar or selecting ‘Start’ from the
Run menu.
5. In the running program, enter the following values in the three textboxes, Employee Name: “Deitel”, Salary: ”10”, “Overtime: ”5”. Press ‘Enter’ at the Overtime textbox. How much is the Pay Cheque?
|
|
With Salary = 10 and Overtime = 5, the amount of Pay Cheque : _____________ |
|
|
Congratulations! Record End Time: _____________ |
Try to make the program more robust by putting in more error checks in the codes. Work through the tutorial so that you will understand how to create an enhanced Payroll Program using Visual Basic objects.
Last revised: 19 January 2004 15:00
If you spot an error, please contact sbho@mmu.edu.my In addition, please contact me if you find some aspects of this task is not explained clearly so that I can improve this documentation.