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

Unit 2: Working of VB Applications



               2.5  Self Assessment Questions

                  1. What action should you not do in a class’s Initialize event?
                     (a) Set default values.
                     (b) Create dependent objects.

                     (c) Set an object variable to a new copy of the class.
                     (d) Open files or other resources to be used by the class.
                  2. You are using a program that accesses a Single Use ActiveX EXE program. After  creating
                    a second copy of an object defined by the program, what should you expect to happen?
                     (a) More memory is used.
                     (b) Memory is freed.
                     (c) An error occurs. You can only run one copy of a SingleUse program.

                     (d) Nothing.
                  3. You have an ActiveX Automation Server that displays forms. What must be done to have
                    the application run unattended and support multiplethreads?
                     (a) You cannot have unattended Automation Servers.
                     (b) There is nothing that must be done.
                     (c) Remove the forms and code that refers to forms. Then select the Unattended Execution
                        option.
                     (d) Select the Unattended Execution option.
                  4. ActiveX controls are implemented in files with the extension:
                     (a) OCX                      (b) VBX
                     (c) VBX and OCX              (d) OLB and OCX

                  5. A sufficient condition to fire a control’s Validate event is:
                     (a) The user must make a change to the control’s contents and the control’s CausesValidation
                        property must be True.

                     (b) The user must make a change to a control’s contents and set focus to another control
                        on the same form whose CausesValidation property is True.
                     (c) The user must set focus to another control on the same form and the CausesValidation
                        property of the control losing focus must be True.
                     (d) The user must set focus to a control whose CausesValidation property is True.
                  6. Which of the following statements will raise an event called Click with no parameters?
                     (a) RaiseEvent Click

                     (b) Call UserControl_Click
                     (c) RaiseEvent UserControl_Click
                     (d) Raise Click


                                      LOVELY PROFESSIONAL UNIVERSITY                         29
   30   31   32   33   34   35   36   37   38   39   40