I've created a slide in slide out menu for an application. This one comes from left of screen. If you want the menu on the right then changes the '.width 'for '.left' and change the '+' and '-' signs.
You need:
Panel - name: pnlmenu - dock: left - width: 20
Timer - name: timhover - interval: 1
Timer - name: timhover2 - interval: 1
Hope It HelpsCode:Private Sub timhover_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timhover.Tick If pnlmenu.Width < 150 Then pnlmenu.Width = pnlmenu.Width + 8 ElseIf pnlmenu.Width = 150 Then timhover.Enabled = False End If End Sub Private Sub pnlmenu_MouseHover(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnlmenu.MouseHover timhover.Enabled = True End Sub Private Sub pnlmenu_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnlmenu.MouseLeave timhover.Enabled = False timhover2.enabled = True End Sub Private Sub timhover2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles timhover2.Tick If pnlmenu.Width > 20 Then pnlmenu.Width = pnlmenu.Width - 8 ElseIf pnlmenu.Width = 20 Then timhover2.Enabled = False End If End Sub
-----
knxrb





Reply With Quote