Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

problem with Application.ShowMainForm

Posted on 1998-10-30
5
Medium Priority
?
930 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
ID: 1345120
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
ID: 1345121
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 400 total points
ID: 1345122
Try setting Visible to True before setting  
Form1.Visible := true;
Application.ShowMainForm := true;

0
 
LVL 1

Author Comment

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

Expert Comment

by:inter
ID: 1345124
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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

876 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