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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:12:49+00:00 2026-05-12T19:12:49+00:00

I mean when the user starts my application(exe). I want it to start directly

  • 0

I mean when the user starts my application(exe). I want it to start directly in system tray, without showing the window. Like antivirus softwares & download managers, which start and run in the system tray silently.

I want the same effect and when user click the “show” button of the notifyIcon’s contextmenustrip then only application should show GUI.

I’m using this, but its not working

    private void Form_Load(object sender, EventArgs e)
    {
        this.Hide();
    }

May be I need to have Main() function in some other class which has no GUI but has notifyIcon & ContextMenuStrip whose option will instantiate the GUI window class. Right?

  • 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-12T19:12:49+00:00Added an answer on May 12, 2026 at 7:12 pm

    The way I usually setup something like this is to modify the Program.cs to look something like the following:

        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
    
            using (NotifyIcon icon = new NotifyIcon())
            {
                icon.Icon = System.Drawing.Icon.ExtractAssociatedIcon(Application.ExecutablePath);
                icon.ContextMenu = new ContextMenu(new MenuItem[] {
                    new MenuItem("Show form", (s, e) => {new Form1().Show();}),
                    new MenuItem("Exit", (s, e) => { Application.Exit(); }),
                });
                icon.Visible = true;
    
                Application.Run();
                icon.Visible = false;
            }
        }
    

    Using this, you don’t need to worry about hiding instead of closing forms and all the rest of the hacks that can lead to… You can make a singleton form too instead of instantiating a new Form every time you click the show form option. This is something to build off of, not the end solution.

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

Sidebar

Related Questions

I want to clear dataview item when it lost focus, mean when user click
1) re-login in asp.net In my application,I do not want two user login with
How to set winform start position at top right? I mean when user click
How can we store user information in session in silverlight, mean how to handle
What exactly is meant by the term rich user interface? Does it mean the
The unique poll/vote/survey i mean here is, user can only vote once. How do
Is it possible to wait for user touch inside a while loop? I mean,
I mean things like: FK1 -> 1FK2 -> 2PK Please, note that 1FK2 is
I mean something like this: http://www.globalscaletechnologies.com/p-25-sheevaplug-dev-kit-uk.aspx My minimal hardware requirement is: Ethernet card UPDATE:
I'm current on POS project. User require this application can work both online and

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.