Results 1 to 2 of 2

Thread: Form Manipulation?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Apr 2002
    Posts
    237

    Form Manipulation?

    How do I make my form expand gardually with a press of a button and get retracted again by pressing another button. ?

  2. #2
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431
    Add a timer to your form and do something like this
    VB Code:
    1. Option Explicit
    2. Private gintFactor As Integer
    3.  
    4. Private Sub cmdDecrease_Click()
    5.  
    6.     gintFactor = -25
    7.  
    8.  
    9. End Sub
    10.  
    11. Private Sub cmdIncrease_Click()
    12.  
    13.     gintFactor = 25
    14.  
    15. End Sub
    16.  
    17. Private Sub Form_Load()
    18.  
    19.  Timer1.Interval = 200
    20.  
    21. End Sub
    22.  
    23.  
    24. Private Sub Timer1_Timer()
    25.  
    26.     Me.Height = Me.Height + gintFactor
    27.     Me.Width = Me.Width + gintFactor
    28.  
    29. End Sub
    You can change the Timer interval and/or the factor.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width