After the system opens I want to hide the main form.

Posted on 2006-04-06
Last Modified: 2010-04-05
Hello guys

I have a component named RxTrayIcon that sends my application to system tray. My application is on the start, when the computer is turned on my system is loaded . What I want is after loading my system is to hide it. When I click on close system I run this code:

  RxTrayIcon1.Active := True;
  CanClose := False

How could I do this after loading it.

Question by:hidrau
    LVL 15

    Accepted Solution

    How about dropping a timer onto your form and enabling it after load. Set the timer to a couple of seconds then call that exact code within the timer event. Ive used this way many times.
    LVL 15

    Expert Comment

    procedure TForm1.Timer1Timer(Sender: TObject);
      Timer1.Enabled := False;
      RxTrayIcon1.Active := True;
    LVL 14

    Expert Comment

    Hi, you can also do this in your Project's code:

    Application.ShowMainForm := False;

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
    Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now