We help IT Professionals succeed at work.

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

hidrau
hidrau asked
on
Medium Priority
221 Views
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;
  Fmenu.Hide;
  CanClose := False

How could I do this after loading it.

Thanks
Comment
Watch Question

Engineer
Commented:
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.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Mike LittlewoodEngineer

Commented:
procedure TForm1.Timer1Timer(Sender: TObject);
begin
  Timer1.Enabled := False;
  RxTrayIcon1.Active := True;
  Fmenu.Hide;
end;
Hi, you can also do this in your Project's code:

Application.ShowMainForm := False;
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.