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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T09:53:04+00:00 2026-06-09T09:53:04+00:00

I want to check if a problem that sometimes show up and sometimes not

  • 0

I want to check if a problem that sometimes show up and sometimes not still happen.
So instead closing manual the application and start again all the time is there anything that can make it automatic untill the problem will show up ? Or something that will simulate Form Closing.

  • 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-09T09:53:07+00:00Added an answer on June 9, 2026 at 9:53 am

    You can try this

    Timer timer;
    
    public void StartTimer()
    {
        timer = new Timer();
        timer.Interval = 5000; // 5 seconds
        timer.Tick += new EventHandler(timer_Tick);
        timer.Start();
    }
    
    void timer_Tick(object sender, EventArgs e)
    {
        Process[] p = Process.GetProcessesByName("TheApp");
        if (p.Length == 0) {
            // Restart the app if it is not running any more
            Process.Start(@"C:\Programs\Application\TheApp.exe");
        } else {
            p[0].CloseMainWindow();
        }
    }
    

    Use a Timer to call a method at certain intervalls. When the Timer ticks, look if a process with the given name exists. If it exists close its main window (do not just kill it). If it does not exist, start it.

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

Sidebar

Related Questions

My Problem is that I want to check if the Arrow up or down
I have the following problem. I want to check that the item clicked on
I want to check checkbox like $('#riderCheck').attr('checked','true') on some condition. but the problem is
I came across this problem when I want to check what I input is
I have been stumped all day on this problem. Basically I want to check
I ran into a strange problem. In my unit test, I want to check
I have this programming problem, I'm using C#. I want to check if varA
Here is my problem Image I want to check if the balls are touching,
I think that my problem is not that hard to solve. I must be
I am having problems here if I want to check if eerste points 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.