Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET minimized
how to apply minimize animation in windows form in vb.net just like in windows 7
 
plss help!!
Posted 4-Mar-13 23:38pm
Omkaara879
Comments
Jeff Blankenburg at 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 at 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
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You can use a timer and the control's .left/.right/.top/.bottom to animate the control's position.
 
'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
  Permalink  
v2
Comments
Omkaara at 18-Mar-13 9:14am
   
but after minimizing i cant magzimise it ....
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 430
1 DamithSL 288
2 Sergey Alexandrovich Kryukov 220
3 Peter Leow 215
4 Maciej Los 195


Advertise | Privacy | Mobile
Web01 | 2.8.140709.1 | Last Updated 18 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid