How to Make a Toolbar for Visual Basic Reappear

How to Make a Toolbar for Visual Basic Reappear thumbnail
Create a toolbar in Visual Basic.

Making a toolbar reappear in your Visual Basic (VB) application is not complicated. In VB, you can access control properties by using the control's name. To hide or show a toolbar control, you can use the "Hide" and "Show" properties. Hiding controls can be user-unfriendly if new controls start popping up out of nowhere when you are using the application. It's good practice to disable the control instead of hiding it.

Instructions

    • 1

      Launch Microsoft Visual Basic and click "New Project" from the left pane of your screen. Click "Windows Forms Application" and click "OK" to start a new project.

    • 2

      Double-click "ToolStrip" from the Toolbox pane to add a new toolbar to your form. Double-click "Button" to add a new button to your form. Add a second button using the same technique.

    • 3

      Double-click "Button1" to create a click event for the button, then add the following code to hide the tool bar control:

      Me.ToolStrip1.Hide()

    • 4

      Switch back to form design and double-click "Button2" to create a click event. Add the following code to make the tool bar reappear:

      Me.ToolStrip1.Show()

    • 5

      Press F5 to run the program and click "Button1." Click "Button2" to show the toolbar.

Related Searches:

References

  • Photo Credit Ablestock.com/AbleStock.com/Getty Images

Comments

Related Ads

Featured