Page 81 - Open Soource Technologies 304.indd
P. 81

Unit 3: Understanding Controls and Control Events



                     (a) All controls on all forms in the project are enumerated and displayed.
                     (b) All controls on loaded forms in the project are enumerated and displayed.

                     (c) Only visible controls on all forms in the project are enumerated and displayed.
                     (d) Only visible controls on loaded forms in the project are enumerated and displayed.

               3.10 Review Questions

                  1. What is the difference between the Text and the Name properties of a button?
                  2. Place a text box on a form and select the text box. What is the effect of pressing the various
                    arrow keys while holding down the Shift key?
                  3. Which of the controls presented in this section can receive the focus? Design a form
                    containing all of the controls, and repeatedly press the Tab key to confirm your answer.
                  4. Create a form with two group boxes, each having two radio buttons attached to it. Run
                    the program, and confirm that the two pairs of radio buttons operate independently of each
                    other.

                  5. What is the difference between a set of check boxes attached to a group box and a set of
                    radio buttons attached to a group box?

                  6. Why are radio buttons also called “option buttons”?
                  7. Create a text box named txtGreeting and containing the word “HELLO” in large italic
                    letters.

                  8. Create a read-only text box containing the words “Visual Basic” in bold white letters on
                    a red background.

                  9. Create a form named frmHello whose title bar reads “Hello World”.
                 10. Create a label containing a picture of a diskette. (Hint: Use the Wingdings character) Make
                    the diskette as large as possible.
                 11. Create a list box that will be invisible when the program is run.
                 12. Create a button containing a picture of a red bell. (Hint: Use the Wingdings character %.)
                    Make the bell as large as possible.
                 13. Give a situation where the MaxLength property of a text box is useful.
                 14. How can I call a Command button without clicking it?

                 15. How do I set a shortcut key for label?
                 16. What is the maximum size of a textbox?
                 17. Write a program with a single text box and a menu with the single top-level item Edit and
                    the four second-level items Copy, Paste, Cut, and Exit. Copy should place a copy of the
                    selected portion of txtBox into the clipboard, Paste should duplicate the contents of the
                    clipboard at the cursor position, Cut should delete a selected portion of the text box and
                    place it in the clipboard, and Exit should terminate the program.


                                      LOVELY PROFESSIONAL UNIVERSITY                         75
   76   77   78   79   80   81   82   83   84   85   86