VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



A cool way to unload a form /end a program

by Knite Ronnie (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 28th March 2002
Date Added: Mon 8th February 2021
Rating: (1 Votes)

A cool way to unload a form /end a program

Rate A cool way to unload a form /end a program




private sub command1_click()

 'how fast

 timer1.interval=100 ' a bit slow, use 20 to make it faster 

end sub

Private Sub Timer1_Timer()

'check first if the form is at the top 

If Form1.Left >= -255 And Form1.Top >= 0 And Form1.Width >= 600 And Form1.Height >= 305  'same line

   
   Form1.Left = Form1.Left - 50 'move form to the left
   
   Form1.Top = Form1.Top - 50 ' move form up
   
   Form1.Height = Form1.Height - 70 'Decrement the Height of the form
   
   Form1.Width = Form1.Width - 100 ' decrement the width of the form

Else
   ' if its at the top left 

  Timer1.Interval = 0 ' stop the timer
  
  End ' end the program
   
End If

End Sub

Download this snippet    Add to My Saved Code

A cool way to unload a form /end a program Comments

No comments have been posted about A cool way to unload a form /end a program. Why not be the first to post a comment about A cool way to unload a form /end a program.

Post your comment

Subject:
Message:
0/1000 characters