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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T04:26:21+00:00 2026-05-28T04:26:21+00:00

I want to run my program with the icon showing in the system tray

  • 0

I want to run my program with the icon showing in the system tray but without the mainform showing from the start.

Edit:

  lMainForm := new MainForm; 
  lMainForm.ShowInTaskbar := true;
  Application.Run(lMainForm);

Didn’t work. As soon as Application.Run is executed, mainform is displayed along with the icon in the system tray.

  • 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-28T04:26:21+00:00Added an answer on May 28, 2026 at 4:26 am

    The problem you have at the moment is that you are calling the Application.Run overload that takes the main form as a parameter. This will show the main form which you do not want.

    Instead you should call one of the other Application.Run overloads.

    For example you can call the no parameter overload of Application.Run. Make sure that you have created and installed your notify icon before you do so. And also create, but do not show your main form.

    When you are ready to show your main form, in response to an action on the notify icon, call lMainForm.Show. You will also wish to arrange that clicking the close button on the form merely hides the form rather than closing it. I’m assuming that you want your main form instance to persist hidden in the background.

    So the top-level of your program would look like this:

    //create and show the notify icon here
    lMainForm := new MainForm; 
    lMainForm.ShowInTaskbar := true;
    lMainForm.Visible := false;//I believe this is the default in any case
    Application.Run;
    

    You’ll need to add an item to the notify icon menu that closes the application. Implement this with:

    Application.Exit;
    

    If you need more fine grained control over the application lifetime then you may be better off using the Application.Run overload that receives an ApplicationContext.

    Since I don’t have Prism at hand I have checked this out with C#/WinForms and I hope it transfers alright to Prism!

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

Sidebar

Related Questions

I want to run the following command from a C program to read the
I can run my program outside of a jar file, but I want to
I want to run a program in linux without the X borders. It's a
I want my program to start with a balloon icon and once it is
I want to run a program from inside my makefile which is linked against
I have written php program and uploaded on server. I want run this program
I want to run my C++ program after flushing the cache, Before running my
I want to run my client program 25,000 times. I need to create a
I want run a script as follows: runner: ssh 'java program &' ssh 'java
I want to design a c# program which can run program a 3rd exe

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.