Beginning Visual Basic® 2015 by Bryan Newsome

Beginning Visual Basic® 2015 by Bryan Newsome

Author:Bryan Newsome
Language: eng
Format: epub
ISBN: 9781119092087
Published: 2015-11-14T00:00:00+00:00


NOTE This example shows you how to use the timer control in another way. Using the timer control to call other methods is not always the best place. You can call the ToggleMenus events when the user clicks other objects as well.

SUMMARY

This chapter explained how to implement menus, menu items, and submenu items. You also learned how to implement multiple toolbars, although that was not the focus of the chapter. Through practical hands-on exercises, you have seen how to create menus, menu items, and submenu items. You have also seen how to add access keys, shortcut keys, and images to these menu items.

Because you used the Edit menu in the Try It Outs, you have also seen how easy it is to implement basic editing techniques in your application by using the properties of the TextBox control and the Clipboard object. Now you know how easy it is to provide this functionality to your users—something users have come to expect in every good Windows application.

You also explored how to create and implement context menus and how to override the default context menus provided by Windows. Because you already coded the procedure to implement undo, cut, copy, and paste operations, you simply reused that code in your context menus.

Now that you have completed this chapter, you should know how to do the following:

Add a MenuStrip control to your form and add menus, menu items, and submenu items.

Customize the menu items with a check mark.

Add access keys and shortcut keys to your menu items.

Add a ContextMenuStrip control to your form and add menu items.

Use the properties of the TextBox control to toggle the Enabled property of menu items.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.