Start New Discussion within our Software Development Community

I like to use pop out panels that would just slide but sometimes it looks bad. is there a way i can fix it to make is as smooth as possible? here is the code i use

dim pp as new point
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        pp = Panel1.Size
    End Sub
Private Sub panel1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles playlist.MouseHover
        Do Until pp.Height = 200
            pp.Height += 10
            Panel1.Height = pp.Height
        Loop
    End Sub
    Private Sub panel1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles playlist.MouseLeave
        Do Until pp.Height = 100
            pp.Height -= 10
            Panel1.Height = pp.Height
        Loop

See if this helps.

Private Sub Panel1_MouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseHover
        If Panel1.Height = 200 Then Exit Sub
        For i As Integer = 100 To 200 Step 1
            Panel1.Height = i
        Next
    End Sub
    Private Sub Panel1_MouseLeave(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Panel1.MouseLeave
        If Panel1.Height = 100 Then Exit Sub
        For i As Integer = 200 To 100 Step -1
            Panel1.Height = i
        Next
    End Sub
This question has already been answered. Start a new discussion instead.