This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “User Interface – Controlling the Tab Order”.
1. Which property contains a number that represents the order in which the control was added to the form?
a) TabIndex property
b) Order property
c) Tab order property
d) Index property
Explanation: Most controls have a TabIndex property that determines the order in which the controls was added to the form. The first control added to the form has TabIndex 0, the second control has TabIndex 1 and so on.
2. What determines the Tab order?
a) TabIndex values
b) TabOrder values
c) Tab values
d) Arrangement of the controls in the interface
Explanation: The tab index values determine the tab order which is the order in which each control receives the focus when the user wither presses a Tab key or employs an access key while an application is running. A control whose TabIndex is 2 will receive the focus immediately after the control whose TabIndex is 1.
3. When a control has focus it can accept __________
b) any user input
Explanation: When a control has focus, it can accept user input, which can be anything, and it will be accepted as a string i.e. even a number will be accepted as a string, and we need to change to number by parsing in the click event property, if we want to work with the number itself.
4. A __________ is an example that accepts user input and is determined by a label control.
a) Text box
b) Property box
c) Tool box
Explanation: To determine the appropriate tab index values you must first make a list of the controls that accept user input. The list should reflect the order in which the user wants to access the controls. If a control that accepts user input is defined by a label control, you should include the label control in the list. A text box is such an example that accepts user input and is determined by the label control.
5. Set the identifying labels tab index property that is __________ than text box’s tab index property.
a) One number lesser
b) One number more
c) Same as text box’s tab index
d) Does not depend on text box’s tab index
Explanation: Since the identifying level of the text box contains the text box’s access key, thus the identifying level must be assigned tab index value one number less than the text box’s tab index value such that it can work properly.
6. You can set the control’s tab index property using __________
a) Properties window
b) Control Window
Explanation: You can set the control’s Tab Index property from the properties Window or the tab order option on the View menu. The Tab order option is available only when the designer window is the active window.
7. When you start an application, the computer sends the focus to the control whose TabIndex is __________
b) Last TabIndex (that is if we have 8 control’s at 8th Tab Index)
Explanation: When you start an application, the computer sends the focus to the control whose TabIndex is zero. However, since level controls cannot receive the focus, the computer sends the focus to the next control in the tab order sequence. The blinking insertion in the text box indicates that it has the focus, and can receive input text from you.
8. Use the __________ to verify the tab order control in the interface.
a) Enter key
b) Shift key
c) Tab key
d) Alt key
Explanation: Tab key moves the focus forward and Shift+tab key moves the focus backward. If we place the focus at TabIndex 0 and continue pressing tab key, we can verify the tab order control in the interface. When the button has the focus its border is darkened.
9. Pressing the enter key when the button is on focus produces __________
a) Button’s properties
b) Button’s click event
c) Dialog box to change button name
d) Removes the button
Explanation: Pressing the Enter key when the button has the focus invokes the Button’s click event, causing the computer to access any code in the Click Event procedure.
10. Press __________ to move the focus to the text box’s access key named textBlue.
Explanation: When an application starts to remove the focus to an text box’s access key, use the Alt key plus the starting name after the keyword “text”, that is to move focus to textbox named textBlue press Alt+b ; similarly to move the focus to textName press Alt+n.
Sanfoundry Global Education & Learning Series – Visual Basic.
To practice all areas of Visual Basic, here is complete set of 1000+ Multiple Choice Questions and Answers.
Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!