Tag Archives: menu items

Quickly insert standard menu items on a form in C#

Many applications need standard File, Edit, Tools, and Help menus. Visual Studio provides a simple way to build standard menu items. You can then edit the menu to add new items and remove items that you don’t need. Visual Studio … Continue reading

Posted in menus, user interface | Tagged , , , , , , , , , , | Leave a comment

Use ActiveControl to enabled and disable menu items in C#

This program uses the ActiveControl property to determine what menu items should be enabled and disabled at any given moment. When the user opens a menu, only the appropriate items should be enabled. This example has Copy, Cut, and Paste … Continue reading

Posted in controls | Tagged , , , , , , , , , , , | Leave a comment

Use the ActiveControl property in C#

The ActiveControl property gives a reference to a container’s currently active control. For a form, ActiveControl doesn’t count menus, so a menu item can use ActiveControl to see which control was active when the menu was opened. In this example, … Continue reading

Posted in controls | Tagged , , , , , , , , , | Leave a comment

Make menu items behave like check boxes in C#

Making menu items behave like check boxes is a lot easier than making them behave like radio buttons (see Make menu items act like radio buttons in C#). Simply set the menu item’s CheckOnClick property to true and it will … Continue reading

Posted in controls, menus, user interface | Tagged , , , , , , , , , , | Leave a comment

Make toolstrip buttons act like radio buttons in C#

Sometimes it is useful to make toolstrip buttons behave like radio buttons so the user can pick only one of a set of buttons. This example lets you pick one of the shape tools or the select (arrow button) and … Continue reading

Posted in controls, menus, user interface | Tagged , , , , , , , , , , , | Leave a comment

Make menu items act like radio buttons in C#

This example shows how to make menu items behave like radio buttons in a radio button group. When you select one item, it displays a check mark and the others don’t. The key is the following CheckMenuItem method. // Uncheck … Continue reading

Posted in controls, menus, user interface | Tagged , , , , , , , , , | 7 Comments