Visual Basic Questions and Answers – String Manipulation – Adding a Menu to a Form

«
»

This set of Visual Basic MCQs focuses on “String Manipulation – Adding a Menu to a Form”.

1. You use ______________ to include one or more menus on a Windows form.
a) Menu control
b) Menu strip control
c) Form control
d) Menu properties
View Answer

Answer: b
Explanation: The Menus and Toolbars section of the toolbox contains a MenuStrip tool for instantiating a menu strip control. You use a menu strip control to include one or more menus on a Windows form. Each menu contains a menu title, which appears on the menu bar at the top of the form. When you click a menu title, its corresponding menu opens and displays a list of options, called menu items.
advertisement

2. The list of items displayed by menu title are known as ________________
a) Items
b) Menu list
c) Menu items
d) Lists
View Answer

Answer: c
Explanation: Each menu contains a menu title, which appears on the menu bar at the top of the form. When you click a menu title, its corresponding menu opens and displays a list of options, called menu items. The menu items can be commands (such as Open or Exit), separator bars, or submenu titles.

3. Each of the options on the submenu are referred to as ________
a) Menu items
b) Submenu items
c) Submenu lists
d) Options
View Answer

Answer: b
Explanation: As in all Windows applications, clicking a command on a menu executes the command, and clicking a submenu title opens an additional menu of options. Each of the options on a submenu is referred to as a submenu item. You can use a separator bar to visually group together related items on a menu or submenu.

4. ______________ is used to visually group together related items on a menu or submenu.
a) Separator line
b) Separator bar
c) Line
d) Bar
View Answer

Answer: b
Explanation: You can use a separator bar to visually group together related items on a menu or submenu. Although you can create many levels of submenus, it is best to use only one level in your application, because too many layers of submenus can be confusing to the user.

5. Each menu element is considered as _______________
a) Class
b) Object
c) Instance
d) Member
View Answer

Answer: b
Explanation: Each menu element is considered an object; therefore, each has a set of properties associated with it. The most commonly used properties for a menu element are the Name and Text properties. The programmer uses the Name property to refer to the menu element in code. The Text property stores the menu element’s caption, which is the text that the user sees when he or she is working with the menu.
advertisement

6. The programmer use ______________ property to refer to menu element in code.
a) Text
b) Code
c) Name
d) Element
View Answer

Answer: c
Explanation: The most commonly used properties for a menu element are the Name and Text properties. The programmer uses the Name property to refer to the menu element in code.

7. The ____________ indicates the purpose of the menu element.
a) Caption
b) Text
c) Name
d) Properties
View Answer

Answer: a
Explanation: The most commonly used properties for a menu element are the Name and Text properties. The Text property stores the menu element’s caption, which is the text that the user sees when he or she is working with the menu. The caption indicates the purpose of the menu element. Examples of familiar captions for menu elements include Edit, Save As, Copy, and Exit.

8. ________________ capitalization is used for menu item captions.
a) Book title
b) Sentence
c) Line
d) Title
View Answer

Answer: a
Explanation: Menu title captions should be one word only, with the first letter capitalized. Unlike the captions for menu titles, the captions for menu items typically consist of one to three words. The Windows standard is to use book title capitalization for the menu item captions.

9. Each menu title should have an unique ______________
a) Access key
b) Property
c) Caption
d) Lists
View Answer

Answer: a
Explanation: Each menu title should have a unique access key. The access key allows the user to open the menu by pressing the Alt key in combination with the access key.
advertisement

10. Each menu item should have an _______________ that is unique within its menu.
a) Access key
b) Property
c) Caption
d) Lists
View Answer

Answer: a
Explanation: Each menu item should have an access key that is unique within its menu. The access key allows the user to select the item by pressing the access key when the menu is open. If a menu item requires additional information from the user, the Windows standard is to place an ellipsis (…) at the end of the caption. The ellipsis alerts the user that the menu item requires more information before it can perform its task.

Sanfoundry Global Education & Learning Series – Visual Basic.

To practice MCQs on 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