Toolbars
Toolbars give you buttons at the top of your window
Clicking a button can be set to trigger a menu item
- Add a toolstrip control to your form
- Select the dropdown arrow and select button
If you add the toolbar after the menu it will be put above it.
Right click the toolbar and choose Bring to Front to move it down below the menu
- Click the first button and select the image property
- Choose Project resource file
- Click Import
- Browse to your project and choose all files
- Select your icon file
- Click OK
- Double click the button to add code to the click event
- Add this code:
Me.BackColor = Color.Red
It is actually better to use the code in your menu
This way you do not have to repeat code for the menu and the toolbar
If you had a menu item named RedToolStripMenuItem you can use this
code:
RedToolStripMenuItem.PerformClick()