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

  • Home
  • SEARCH
  • 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 7514723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T00:35:09+00:00 2026-05-30T00:35:09+00:00

I have a C# application which runs as a context menu in the system

  • 0

I have a C# application which runs as a context menu in the system tray. One of the options will display a ‘system information’ box and at the moment I’m opening this window in another thread (on click event) like this…

void menu_SystemInformation_Click(object sender, EventArgs e)
{
    System.Threading.Thread t = new System.Threading.Thread(new System.Threading.ThreadStart(menu_Systeminformation_Thread));
t.Start();
}
void menu_Systeminformation_Thread()
{
    Application.Run(new SystemInformation());
}

I have two questions about this…

  1. How can I make sure that only one instance of this form is opened when the option is selected.
  2. How can I automatically close this form (if it’s open) when the application closes.

Any help is appreciated. I’ve only been doing C# for a few weeks, so go easy on me!
Cheers,

  • 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-30T00:35:11+00:00Added an answer on May 30, 2026 at 12:35 am

    1.How can I make sure that only one instance of this form is opened when the option is selected.

    Programming. Have a central location, check whether you already have an open window. There is no automatism for that, but it is trivial to do.

    2.How can I automatically close this form (if it’s open) when the application closes.

    You dont do anything. THe process closes, all windows get closed anyway. All open OS resources are rleased, including files etc.

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

Sidebar

Related Questions

I have an application which runs using the context menu of windows explorer. I
I have an application which runs a tool that requires network connection. Now my
We have a WinForms application which runs on a touch-screen on a bit of
I have written a application which runs in the background. I want to write
I have an .Net MVC application which runs fine if I use the build
I have an application which loads up c# source files dynamically and runs them
I have a application executable, which runs with different parameters to produce different outputs.
I have developed a Win32 application using C/C++, which runs on Vista and XP.
I have a medium sized application that runs as a .net web-service which I
If I have an application (on C#) that runs under a user context (ex.

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.