This problem is a varation of PP1 for chapter 4. Everythink works fine except th
ID: 3741180 • Letter: T
Question
This problem is a varation of PP1 for chapter 4. Everythink works fine except that I can not get the display rental rates button to work. How do I get it to not appear until I click the "display rental rates" button? After it is visible the "display customer bill" part works fine, I need to make the first listbox( _1stRents in the program) invisible and then become visible when I press the "display rental rates" button( btnRents in the program). Please help, I think i might just need to add a few lines of code in the beginning for this but not sure, thank you.
Rental Cost Table 4.11 gives the price schedule for Eddie's Equipment Rental. Full-day rentals cost one-and-a-half times half-day rentals. Write a program that displays Table 4.9 in a list box when an appropriate button is clicked on and displays a bill in another list box based on the item number and time period chosen by a customer. The bill should include a $30.00 deposit. A sample output is shown in Fig. 4.58 TABLE 4.11 Price schedule for Eddie's Equipment Rental Piece of Equipment 1. Rug cleaner 2. Lawn mower 3. Paint sprayer Half-Day $16.00 $12.00 $20.00 TABLE 4.9 Duration of one vear on each planet Year Mercurian Venusian Earth Martian Earth Days Year Earth 224.7 365.4 687 ovian Saturian Uranian 8 Neptuian Welcome to Eddie's Equipment Rental Price of Equipment 1. Rug cleaner 2. Lawn nower 3. Paint sprayer Half-day Full-day $16.00 $24.00 $12.00 $20.00 $30.00 Display Rentel Rates $18.00 Select an item (1,2, or 3): 2 Receipt from Eddie's Equipment Rental (Pull day rental) Lawn n°?er; $18.00 Deposit: $30.00 Select a duration (H or F): ? Display Customer Bill Total: $48.00 FIGURE 4.58 Possible output for Programming Project 1.Explanation / Answer
To make the listbox, _1stRents invisible at the start, go to the Form_Load() subroutine of this form and there add this line: _1stRents.Visible=False.
Thiswill cause the listbox to be invisible when the form gets loaded.
To make it visible when the button, btnRents is clicked, go to the btnRents_Click() subroutine and add there add this line: _1stRents.Visible=True.
This will cause the listbox to become visible.
I'm not sure I understand the first part of your question: please can you clarify what should not appear until the "display rent rates" button is clicked?
Thanks
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.