Solved

problem with Application.ShowMainForm

Posted on 1998-10-30
5
852 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 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

815 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

13 Experts available now in Live!

Get 1:1 Help Now