This set of Visual Basic Multiple Choice Questions & Answers (MCQs) focuses on “ToolBox Window – Timer Tool”.
1. A timer control is instantiated using __________
a) Timer tool
b) Control tool
c) Stopwatch tool
d) Timer Control Tool
View Answer
Explanation: You instantiate a timer control using timer tool, which is located on the components section of a toolbox. When you drag the timer tool to the form and release the mouse button, the timer tool will be placed on the component tray rather than on the form.
2. The __________ is used to store controls that do not appear in the user interface during runtime.
a) Control tray
b) Timer tray
c) Components tray
d) Store tray
View Answer
Explanation: The component tray is a special area of the IDE. Its purpose is to store controls that do not appear in the user interface during runtime, which occurs while an application is running. In the other words, the timer will not be visible to the user when the interface appears on the screen.
3. The purpose of __________ is to process code at one or more regular intervals.
a) Timer control
b) Process control
c) Code editor
d) Interval control
View Answer
Explanation: The purpose of the timer control is to process code at one or more regular intervals. The length of each interval is specified in milliseconds and entered in the timer’s Interval property.
4. The timer state is determined by __________
a) State property
b) Timer control
c) Enabled property
d) Visible property
View Answer
Explanation: The timer’s state – either running or stopped is determined by its Enabled property, which can be set to either the Boolean value True or the Boolean value False. When its Enabled property is set to True, the timer is running; when it is set to False the Timer is stopped.
5. Which event occurs each time an interval is elapsed in the timer?
a) Tick
b) Click
c) Elapse
d) Count
View Answer
Explanation: If the timer is running, its Tick event property occurs each time an interval is elapsed. Every time the Tick event occurs the computer processes the code contained in the Tick event procedure. If the timer is stopped the Tick event does not occur.
6. What happens when a control is deleted from a form?
a) Does not delete the control’s code
b) Does delete the control’s code
c) Control is deleted in total
d) Control is not deleted, it can be brought back
View Answer
Explanation: Deleting a control from the form, does not delete the control’s code, which remains in the code editor window.
7. __________ is used to delete a certain code from the code editor window.
a) Edit
b) Delete
c) Truncate
d) Free
View Answer
Explanation: To delete a portion of code from the code editor window, select the portion of the code and click delete.
8. __________ button is used to select a control from the form.
a) Exit button
b) Select button
c) Edit button
d) Delete button
View Answer
Explanation: Exit button selects a control from the form, and when you press delete, it only deletes the control from the form, whereas its code remains in the code editor.
9. __________ is used to close both the code from code editor and control from the form.
a) Me.close()
b) This.close()
c) Close All
d) Close()
View Answer
Explanation: Me.close() is used to close both the code from the code editor and the control from the form. Me.close() is entered in the timer’s Tick event procedure.
10. __________ is used to remove a component of the form after a certain period of time.
a) Timer
b) Exit button
c) Remove button
d) Delete button
View Answer
Explanation: As we click on the Exit button, the application comes to an end. But we need to do this physically. Timer replaces the exit button and closes the application after a particular period of time.
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.
- Check Computer Science Books
- Apply for Computer Science Internship
- Practice Computer Science MCQs
- Check Visual Basic Books