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

  • SEARCH
  • Home
  • 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

I am working on a PHP project, so I am not using Visual Studio,
I'm currently working on a project using DSL tools in Visual Studio 2008. Is
i have just started using visual studio 2008.I am working on c#. I want
I have a big project I am working on right now using Visual Studio
I am working on creating a Windows Forms Application in C++ using Visual Studio
is there any way to create a new visual studio project without using IDE,
I'm using Visual Basic 6 for a legacy project and it's been working fine.
I'm working with an OCR project which is developed using Visual C++ on .net
My team working in a project using Winforms application(c#) & MSSQL 2005 as database.
I have an Visual Studio 2010 ASP.Net project. And I want to deploy this

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.