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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T16:21:43+00:00 2026-05-22T16:21:43+00:00

I made some game as a console application, and now I want to move

  • 0

I made some game as a console application, and now I want to move it to the Windows Forms.
In the console mode I use the Thread.Sleep() function to slow some elements in my game (They move from the top to the bottom of the window), but when I use the function in Windows Form application it makes the application window busy. I have to turn off the program by ALT+F4 then.
How can I fix it or is there any way to do that?

  • 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-22T16:21:44+00:00Added an answer on May 22, 2026 at 4:21 pm

    You should use System.Windows.Forms.Timer

    System.Windows.Forms.Timer myTimer = new System.Windows.Forms.Timer();
    
    myTimer.Tick += new EventHandler(TimerEventProcessor);
    myTimer.Interval = 5000;//This is in milli seconds
    myTimer.Start();
    
    
    private void TimerEventProcessor(Object myObject,
                                                EventArgs myEventArgs) {
    {
      //Your code 
    }
    

    Please note that you should not use System.Timers.Timer

    From MSDN: In the .NET Framework version 2.0 and earlier, the Timer component catches and suppresses all exceptions thrown by event handlers for the Elapsed event. This behavior is subject to change in future releases of the .NET Framework. It does not say if it have been changed yet or not.

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

Sidebar

Related Questions

It made some errors like this: KDnsCache.cpp: In member function ‘unsigned int KDnsCache::GetName(const char*)’:
I've made some graphs in my ASP.Net MVC application using the ASP.Net MSChart control.
I am currently working on some game made in C# XNA. Since I need
I made a launcher for my game server. (World of Warcraft) I want to
I made a board game with includes just some little animations. I reduced the
I made a HTML5 game for web browsers. Some of the players asked me
I've made a listview for some games, and when a game is deleted i'd
I have a game application made up of several different activities. The first to
I have a game server which is made in Java. I want to make
Hy, I made a game and I have some problems: when my resources are

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.