Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4065176
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T15:57:00+00:00 2026-05-20T15:57:00+00:00

I am working on a project using Visual Studio(c#). I want to create a

  • 0

I am working on a project using Visual Studio(c#). I want to create a startup form when i install my application with a progress bar. And after progress bar completed this form should be hide and a new form should be open. can u help me about this problem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T15:57:01+00:00Added an answer on May 20, 2026 at 3:57 pm

    Edit:

    I’ve just made a sample application trying to use exactly the code that you’ve specified. It worked fine besides just one tweak:

    Form1().Show(); should be new Form1().Show();

    The only way this code does not execute is if you forgot to set timer1 to enabled state in design view which causes the code to never fire up.

    Are you sure the code is firing up? have you done a break-point on this piece of code?

    On a sidenote: timer1 is not on a separate thread so you don’t need to use Invoke (you can see if you actually need it by looking InvokeRequired property of a control)

    Suggested improvement: if you are not going to use Form2 again and judging from your code, it is likely you won’t; perhaps you should call Close() on Form2 instead of Hide() and release the resources. I’ve had times when my application kept running in background because I hid the form but never closed it and application was on “exit when last window closes” which never happened.

    So to be sure, here is the final code that does work on my machine:

    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    
    namespace WindowsFormsApplication1
    {
        public partial class Form2 : Form
        {
            public Form2()
            {
                InitializeComponent();
    
                //enable timer1 here or in designer
                timer1.Enabled = true;
            }
    
            private void timer1_Tick(object sender, EventArgs e)
            {
                //disable timer1 first thing, otherwise it can end up ticking
                //multiple times before you've had a chance to disable it
                //if the timespan is really short
                timer1.Enabled = false;
    
                int d;
    
                for (d = 0; d <= 100; d++)
                    progressBar1.Value = d;
    
                Hide();
    
                //create a new Form1 and then show it
                new Form1().Show();
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We're working on a project here in Visual Studio 2008. We're using the built-in
I'm working on a project using Windows 2008, .NET 3.5 and WCF for some
I am working on a project using rails 2.1.1. With the new release of
I am working on a project using Castle Active Record. I stumbled across the
I'm working on a project using C++, Boost, and Qt. I understand how to
Working in Eclipse on a Dynamic Web Project (using Tomcat (v5.5) as the app
I'm working on an ASP.NET project using MVP architecture. We would like to use
I'm working on my 1st project using MS Unity IoC framework. If I have
I am working on a Java project using Netbeans for the first time. I
Being a Windows developer I'm currently working on my own project using LAMP. I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.