Solved

problem with Application.ShowMainForm

Posted on 1998-10-30
5
893 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 100 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
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…
In this video, viewers are given an introduction to using the Windows 10 Snipping Tool, how to quickly locate it when it's needed and also how make it always available with a single click of a mouse button, by pinning it to the Desktop Task Bar. Int…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses
Course of the Month10 days, 3 hours left to enroll

623 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