Visual Basic Questions and Answers – ToolBox Window – Timer Tool

«
»

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

Answer: a
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.
advertisement

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

Answer: c
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

Answer: a
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

Answer: c
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

Answer: a
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.
advertisement

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

Answer: a
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

Answer: b
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

Answer: a
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

Answer: a
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.
advertisement

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

Answer: a
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.

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!

advertisement
advertisement
advertisement
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He is Linux Kernel Developer & SAN Architect and is passionate about competency developments in these areas. He lives in Bangalore and delivers focused training sessions to IT professionals in Linux Kernel, Linux Debugging, Linux Device Drivers, Linux Networking, Linux Storage, Advanced C Programming, SAN Storage Technologies, SCSI Internals & Storage Protocols such as iSCSI & Fiber Channel. Stay connected with him @ LinkedIn