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

Unit 3: Understanding Controls and Control Events



                  2. An access key for a TextBox control
                     (a) Can be provided in the TextBox’s Caption property
                     (b) Can be provided in the TextBox’s Text property

                     (c) Can be provided in an accompanying Label control
                     (d) Can be provided in the TextBox’s Label Property
                  3. Which of these statements will assign the value of the Command Button’s Caption property
                    to the TextBox’s Text property?
                     (a) Text1 = Command1

                     (b) Text1 = Command1.Caption
                     (c) Text1.Text = Command1

                     (d) Text1.Text = CStr(Command1)
                  4. You’ve been asked to author an ActiveX control for use by your company. Your ActiveX
                    control contains a constituent label control that exposes its caption property. How could
                    you enable the control’s caption property to reflect its name when it is placed on a form
                    at design time?
                     (a) Private Sub UserControl_InitProperties()
                        LblCaption.Caption = Me.Name

                        End Sub
                     (b) Private Sub UserControl_InitProperties()
                        LblCaption.Caption = UserControl.Name

                        End Sub
                     (c) Private Sub UserControl_InitProperties()

                        LblCaption.Caption = Extender.Name
                        End Sub
                     (d) Private Sub UserControl_Initialize ()

                        LblCaption.Caption = Me.Name
                        End Sub
                  5. Which two properties of a text box control are used to bind to data at runtime?

                     (a) DataField and DataMember.
                     (b) DataSource and DataMember.
                     (c) DataSource and DataField.

                     (d) You can only bind to data at design time.



                                      LOVELY PROFESSIONAL UNIVERSITY                         73
   74   75   76   77   78   79   80   81   82   83   84