Private Sub Form_Unload(Cancel as Integer)
Dim counter as Integer Dim I as Integer counter = me.Height 'Collapse Form Do: DoEvents counter = counter - 10 'Change the 10 according to your CPU's speed. me.Height = counter me.Top = (screen.Height - me.Height) / 2 Loop Until counter <= 10 I = 15 counter = me.Width 'Strech form to edges Do: DoEvents counter = counter + I me.Width = counter me.Left = (screen.Width - me.Width) / 2 I = I + 1 'Change the 1 according to your CPU's speed. Loop Until counter >= screen.Width End End Sub |