public void ProgressTick(object sender, EventArgs e) { if (InnerBar_Rectangle.Width < 721) { InnerBar_Rectangle.Width += 5; } else { ProgressBar_timer.Stop(); this.Hide(); MainPage mpForm = new MainPage(); mpForm.Show(); } }