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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T23:56:16+00:00 2026-06-09T23:56:16+00:00

I have this screen that is on startup, basically like a splash, but it

  • 0

I have this screen that is on startup, basically like a splash, but it isn’t. I put a timer on it. After a few seconds the window must disappear and then the log in must show. I’ve got as far as showing the new form, but it is on a loop. It keeps opening the new form again and again! Here is my code. Where am I doing this wrong?

Timer

int count;
count = 0;

public Windowsplash()
{
    System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();

    dispatcherTimer.Interval = new TimeSpan(0,0,0,0,2500);
    dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick);
    dispatcherTimer.Start();
}
private void dispatcherTimer_Tick(object sender, EventArgs e)
{
    System.Windows.Threading.DispatcherTimer dispatcherTimer = sender as System.Windows.Threading.DispatcherTimer;

    dispatcherTimer.Stop();
    MainWindow _new = new MainWindow();
    _new.Show();
    this.Close();
}

I want to stop the timer, so that the new window can stop opening the whole time!
Thanks!

PS: I edited it to what I now have

  • 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-06-09T23:56:17+00:00Added an answer on June 9, 2026 at 11:56 pm
    int count; 
    count = 0; 
    
    public Windowsplash 
    
        System.Windows.Threading.DispatcherTimer dispatcherTimer = new System.Windows.Threading.DispatcherTimer();
        dispatcherTimer.Interval = new TimeSpan(0,0,0,500); 
        dispatcherTimer.Tick += new EventHandler(dispatcherTimer_Tick); 
        dispatcherTimer.Start(); 
    
    private void dispatcherTimer_Tick(object sender, EventArgs e) 
    { 
        System.Windows.Threading.DispatcherTimer dispatcherTimer = sender as System.Windows.Threading.DispatcherTimer; 
    
            dispatcherTimer.Stop(); 
            MainWindow _new = new MainWindow(); 
            _new.Show(); 
            this.Close(); 
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a window that uses a viewmodel. This screen contains 2 listviews on
I have this code to draw an ellipse in the screen but I don't
I have set up a screen rc file like this: log on shelltitle apt
In my storyboard, I have a view as a splash screen. In this view,
I have some errors with my splash screen that I have been working on
I have a fullscreen iphone web app that has a startup screen that works.
I have a splash screen activity at the startup of app. the startup splash
i have this GUI screen shots from the design team which i needs to
I have an activity with the following layout. So in this screen, initally the
I have designed the screen using this relative layout. <?xml version=1.0 encoding=utf-8?> <RelativeLayout xmlns:android=http://schemas.android.com/apk/res/android

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.