menus in the side of the form

yaniv

Well-known member
Joined
Apr 15, 2002
Messages
162
Location
israel
i want to create a menu (like the upper usual menu), but i want to put it in the left side of my main form (something like web sites links).
The menu supposed to have "main" items and every one from them should open to sub menu when the user press it (little menus like when you write click in other app.)

I dont know how to approach the problem, does some body have any idea?
 
Youll probably need to write your own control to do it, although a StatusBar control might be able to do it; dock it to the left side, and make each panel have one of the "main" items. Create a pop-up menu for each item, and when you click on the StatusBar panels, pop up the menu.

Failing that, a simply UserControl shouldnt be too hard to make for that purpose.
 
heres an idea , put a panel on your form , set it so its left is something like -150 ( depending on the width of the panel ) then do this :
Code:
Public OldPanelPos As Integer /// public variable.

    Private Sub Panel1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.MouseEnter
        Dim x As Integer
        OldPanelPos = Panel1.Left
        For x = OldPanelPos To 0
            Panel1.Left = x
        Next
    End Sub

    Private Sub Panel1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Panel1.MouseLeave
        Panel1.Left = OldPanelPos
    End Sub
then the panel will slide on to the form , from being just sticking out. then you could add options on to the panel as menus.
 
Class library cannot be ran byitself, just like the error said :).
Go into your application project, then toolbar, then right click Add/Remove items, then .NET components, then browse button, and point to its location. Now it will appear in your toolbox and you will be able to place it on your form. From there its easy to add button and things like that.
 
Back
Top