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 6608433
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:36:33+00:00 2026-05-25T19:36:33+00:00

I have a small Windows Forms project and now Iam looking to display an

  • 0

I have a small Windows Forms project and now Iam looking to display an image at project startup, I mean Program.cs

Is it possible?

static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Image MyPrgImage = Image.FromFile("C:\\Temp\\Images\\For_Network.gif");
            ??????

            Application.Run(new Form1());
        }
  • 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-25T19:36:33+00:00Added an answer on May 25, 2026 at 7:36 pm

    Sure… Add new WindowsForm to your project, call it SplashImageForm. Add PictureBox control to it, and add the image you want in it. Resize the form, set these SplashImageForm properties:

    FormBorderStyle - None
    ShowInTaskBar - false
    StartPosition - CenterScreen
    

    Then you want to show that form before Form1 and close it after the timeout has expired… Like so for example:

    static void Main()
    {
        Application.EnableVisualStyles();
        Application.SetCompatibleTextRenderingDefault(false);
    
        SplashImageForm f = new SplashImageForm();
    
        f.Shown += new EventHandler((o,e)=>{
            System.Threading.Thread t = new System.Threading.Thread(() =>
                {
                    System.Threading.Thread.Sleep(2000);
                    f.Invoke(new Action(() => { f.Close(); }));
    
                });
                t.IsBackground = true;
                t.Start();
        });
    
        Application.Run(f);
        Application.Run(new Form1());
    }
    

    EDIT
    Now, there is new thread which blocks on System.Threading.Thread.Sleep(2000) for 2 seconds, and the main thread is allowed to block on Application.Run(f) as it is supposed to, until the SplashImageForm isn’t closed. So the image gets loaded by the main thread and the GUI is responsive.

    When the timeout ends, Invoke() method is called so the main thread which is the owner of the form closes it. If this wasn’t here, Cross threaded exception would be thrown.

    Now the image is shown for 2 secs, and after it Form1 is shown.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have designed a small C# Windows Forms project in VS2010 & now want
I have written a small .net Windows Forms application. And now I decided to
I have developed a small desktop application in c#(using windows forms). For this project
I have a C++/CLI System::Windows::Forms::UserControl derived control which should only redraw (a small portion
Using Windows Forms I would like to have a small login screen the user
I have a small C++ Win forms project developed by visual studio 2005. How
I'm starting on a small windows forms project that makes extensive use of editable
I have a small windows mobile app with roughly 25 forms and maybe 50
I have implemented a small Windows Service which runs every 9 minutes and writes
I am developing a small windows app, but have some trouble deciding whether to

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.