Академический Документы
Профессиональный Документы
Культура Документы
2. Save the application in a new folder named Danilo Pizza 3. Save the form as Main and save the project as DaniloPizza 4. Design the form Right-click the form and click View Code
5. Define the procedure 6. On the form double-click each radio button and each check box 7. In their implementation, simply call the CalculatePrice() function: 8. Test the application and close the form 9. In the Objects combo box, select the txtQtyWings 10. In the Procedure combo box, select LostFocus 11. In the same way, initiate the LostFocus event of each Qty text box 12. Implement the events . 13. In the form, double-click the Close button and implement its Click event.
Label TextBox Frame Label Label Label Label TextBox TextBox TextBox Label TextBox TextBox TextBox Label TextBox TextBox TextBox Label TextBox TextBox TextBox Label TextBox TextBox TextBox Button Label Text Box
Each Topping 0.45 Drinks Qty Unit Price Sub Total Soda Can 0 1.45 0.00 Soda 20 Oz. 0 1.45 0.00 Soda 2L Bottle 0 1.45 0.00 Orange Juice 0 2.25 0.00 Water 0 1.25 0.00 Close Total Price 0.00 txtTotalPrice Alignment: 1 - Right Justify txtQtyWater txtPriceWater txtTotalWater cmdClose Alignment: 1 - Right Justify Alignment: 1 - Right Justify Alignment: 1 - Right Justify txtQtyOJ txtPriceOJ txtTotalOJ Alignment: 1 - Right Justify Alignment: 1 - Right Justify Alignment: 1 - Right Justify txtQtySoda2L txtPriceSoda2L txtTotalSoda2L Alignment: 1 - Right Justify Alignment: 1 - Right Justify Alignment: 1 - Right Justify txtQtySoda20 txtPriceSoda20 txtTotalSoda20 Alignment: 1 - Right Justify Alignment: 1 - Right Justify Alignment: 1 - Right Justify txtQtyCan txtPriceCan txtTotalCan Alignment: 1 - Right Justify Alignment: 1 - Right Justify Alignment: 1 - Right Justify txtEachTopping Alignment: 1 - Right Justify
Then, the person who is pledging money will specify the percentage of money that can be allocated to each institution. We will use three up down buttons to set the percentages. We must synchronize them so that the total values of the up down buttons must not exceed 100. The amount pledged is then converted with regards to each up down.
4. Right-click the Toolbox and click Components 5. In the Controls property page of the Components dialog box, click the check mark of the Microsoft Windows Common Controls-2 6.0 (SP4)
6.
7. Design the form as follows Double-click each up down control, the Amount
8. Implement the events 9. Test the application
Control Label TextBox Label TextBox UpDown Label TextBox Label TextBox UpDown Label TextBox Label TextBox UpDown Label TextBox Label Button
Name
Additional Properties
txtAmountPledged Alignment: 1 - Right Justify txtRate1 updAmount1 Alignment: 1 - Right Justify BuddyControl: txtRate1 SyncBuddy: True Alignment: 1 - Right Justify
% 0.00 Leicester University: 25 txtRate2 updAmount2 % 0.00 Lars Union Academy: 25 txtRate3 updAmount3 % 0.00 Message Close txtAmount3 lblMessage cmdClose Alignment: 1 - Right Justify BuddyControl: txtRate3 SyncBuddy: True txtAmount2 Alignment: 1 - Right Justify BuddyControl: txtRate2 SyncBuddy: True txtAmount1
Project 3 CD Publisher
Develop an application for a small CD publishing company. The owner wants the prices to be calculated so a customer would get a discount if he orders more. To attract customers and encourage them to order more, she has decided to fix the prices so that the customer would pay: $20/CD if she orders less than 20 units $15/CD if she orders less than 50 units $12/CD if she orders less than 100 units $8/CD if she orders less than 500 units $5/CD if she orders more than 500 units
2. Save the application in a new folder named CD Publisher 3. Save the form as frmMain and save the project as CDPublisher
4. To use the needed spin button, on the main menu, click Project -> Components... 5. In the Components dialog box, click the Microsoft Windows Common Controls 6.0 (SP4) check box
6. Click OK
7. Design it as follows
8. Double-click the Close button and implement its Click
9.
10. To allow the user to enter a quantity value, access the LostFocus event of the txtQuantity text box and implement it
Control Form
Properties Name: frmMain Border Style: 3 - FixedDialog Caption: CD Publisher Caption: Number of CDs: Name: txtQuantity Alignment: 1 - Right Justify Name: updQuantity Alignment: 1 Buddy Control: txtQuantity Max: 10000 Caption: Unit Price: Name: txtUnitPrice Alignment: 1 - Right Justify Caption: Total Price: Name: txtTotalPrice Alignment: 1 - Right Justify