Solved

problem with Application.ShowMainForm

Posted on 1998-10-30
5
826 Views
Last Modified: 2008-02-26
hi,

in my project file i have this line of code:
Application.ShowMainForm := False;
yes, i don't want my program to popup when it starts.

the problem is that when i click my icon in the system tray and my program pops up on the screen, my components are not visible. only my speedbuttons are visible.

if i remove the line:
Application.ShowMainForm := False;
every component becomes visible but as i said, i don't want my program to popup when it starts.

/saam
0
Comment
Question by:saam
  • 2
  • 2
5 Comments
 
LVL 12

Expert Comment

by:rwilson032697
Comment Utility
When the user clicks on the system tray button for your application set ShowMainForm to true again.

Cheers,

Raymond.
0
 
LVL 1

Author Comment

by:saam
Comment Utility
thanks for the quick response  rwilson, but i have tried to put ShowMainForm to true (in several different places of my project), it still won't work.

my mainform shows up when i click the system tray button, but only the form plus my speedbuttons are visible, not my richedit and my standard buttons.

/saam

0
 
LVL 5

Accepted Solution

by:
inter earned 100 total points
Comment Utility
Try setting Visible to True before setting  
Form1.Visible := true;
Application.ShowMainForm := true;

0
 
LVL 1

Author Comment

by:saam
Comment Utility
i thought i had tried everything but that was it!
thanks a lot!
/saam
0
 
LVL 5

Expert Comment

by:inter
Comment Utility
You are welcome,
I have realized the thing by directly inspecting TApplication source...(you can always analyze the source if you have delphi professional or higher)
c.u. igor
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

772 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

8 Experts available now in Live!

Get 1:1 Help Now