CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 10 of 10

Threaded View

  1. #1
    Join Date
    Sep 2008
    Posts
    13

    [SOLVED] how to animate this.height ?

    Code:
    namespace WindowsFormsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
            int h;
            private void Form1_Load(object sender, EventArgs e)
            {
                this.Height = 100;
                h = this.Height;
            }
    
            
    
            private void button1_Click(object sender, EventArgs e)
            {
              
                while (h >= 800)
                {
                    
                    this.Height = h;
                    h++;
                
                }
    
            }
    
    
        }
    }
    Why isnt it working? What is wrong?
    maybe "this" is related to button1.

    I want that the height of the form changes from 100 to 800 smoothly, during 1 second or so.
    heeelp... thanx..


    *****Ooops! I posted in the wrong category. admin, please move this thread to the right section. sorry...
    Last edited by alexandergre; February 23rd, 2009 at 11:35 AM.

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

Featured