In this posting I'll write a sample of simple VB6 program that using Select Case..End Select control structure. However this program also using several VB6 functions like Val() (to convert text into number so can be calculated), Len() (to get the length of a text) and Left() (to pick up a part from the left side of a text).
The scenario of the program is as the following: Sales Quantity = 1 - 2 -> Bonus = 2%
Sales Quantity = 3 - 4 -> Bonus = 3%
Sales Quantity = 5 - 6 -> Bonus = 4.5%
Sales Quantity = 7 - 8 -> Bonus = 6.5%
Sales Quantity = 9 -> Bonus = 10%
Sales Quantity = 10 or more -> Bonus = 15%
The screen design of the program is like below screenshot.
Now, let's design the program first (create screen interface).
Look at image above, your screen design should like that.
Ok, now the time to save your work (your program) in order you can edit it next time (this program will be used in the next posting). Here it is tips to save your VB6 program:
Note: The extention .vbp and .frm will automatically given by the system.
Ok, now your program has been saved. You have 2 files in your project: prjBonus.vbp and frmCalBonus.frm and you can close your VB program. I'll continue to write the program coding in the next posting.
Select Case End Select - VB6 Sample Program Part 1
Subscribe to:
Post Comments (Atom)
Labels
- Stop Dreaming Start Action (1)
- Table of Contents (1)
- VB6 Programming (36)
- VB6 Sample Program (16)
0 comments:
Post a Comment