Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
how to apply minimize animation in windows form in vb.net just like in windows 7

plss help!!
Posted
Comments
Jeff Blankenburg 5-Mar-13 8:01am    
I'm going to need some help here. Can you specifically describe which animation you mean? What are you trying to apply this animation to? Do you have some code you could provide?
Omkaara 6-Mar-13 3:04am    
not exactly animation
just like windows 7 minimize effects when i minimized a window in win 7 os it minimizes bit slowly
no; not tried coding yet
i just want idea that what Microsoft did for that minimize effect
so i can do for my vb2005 application

To reverse it(maximize), just reverse the direction -

Private Sub TMR_Max_Tick(sender As Object, e As EventArgs) Handles TMR_Max.Tick
Dim RSV As Integer
RSV = "-" & PAN_PBAR.Size.Height
If PAN_PBAR.Top = 0 Then '1080 is the height of the control/form
TMR_Max.Enabled = False
PAN_PBAR.Location = New Point(0, 0)
Else
PAN_PBAR.Top -= 50 'this is how many pixels the control is moved per tick(adjust this and the timer interval to get the desired speed that you want)
End If
End Sub

If you have any more problems, I'll be glad to help.
 
Share this answer
 
You can use a timer and the control's .left/.right/.top/.bottom to animate the control's position.

VB
'Minimize Control
    Private Sub TMR_Min_Tick(sender As Object, e As EventArgs) Handles TMR_Min.Tick
        Dim RSV As Integer
        RSV = "-" & PAN_PBAR.Size.Height
        If PAN_PBAR.Top > 1080 Then '1080 is the height of the control/form
            TMR_Min.Enabled = False
            PAN_PBAR.Location = New Point(0, 1080)
        Else
            PAN_PBAR.Top += 50 'this is how many pixels the control is moved per tick(adjust this and the timer interval to get the desired speed that you want)
        End If
    End Sub


'Activate
Private Sub BTN_Min_Click(sender As Object, e As EventArgs) Handles BTN_Min.Click
TMR_Min.Enabled = True
End Sub
 
Share this answer
 
v2
Comments
Omkaara 18-Mar-13 9:14am    
but after minimizing i cant magzimise it ....

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900