Solved

Minimise forms

Posted on 2007-03-27
6
181 Views
Last Modified: 2010-04-05
I have an application that I want to be minimized to taskbar at startup.

and also I have a second form which i show when i hold down a key (i have the code to make it show when i hold the key and it works fine)
but i when i minimise on the first form, the second form is minimized too.

When i minimise the first form, I want the first form to remain visible
and how do i set minimise on the form1 at startup.

This is what I have so far on minimize at startup but it doesnt work

  Application.ShowMainForm := false;
  Application.Initialize;

  Application.CreateForm(TForm1, Form1);
0
Comment
Question by:Alpha_AI
[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
6 Comments
 
LVL 6

Expert Comment

by:Hardi
ID: 18798991
To minimize form on startup, you can put this in FormCreate
  Self.WindowState := wsMinimized;

But I'm not sure how to make the second form visible.
0
 

Author Comment

by:Alpha_AI
ID: 18799019
ok.

When i minimise the first form, I want the second form to remain visible, does any one know how to do that?

Ben
0
 
LVL 6

Expert Comment

by:Hardi
ID: 18799054
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 11

Expert Comment

by:A. Cristian Csiki
ID: 18799668
If i understood right you wish to display only the 2nd form for a while at start up.:
try this:
pun a timer and set it's interval 10,
ontimer property write:

procedure TForm1.Timer1Timer(Sender: TObject);
begin
form1.hide;
form2.bringtofront;
form2.show;
timer1.enable:=false;
end;

:) good luck,
cheers
0
 
LVL 4

Accepted Solution

by:
spk2000ar earned 125 total points
ID: 19113228
The second form is something like a splashscreen?
If so, then you can make this with something like this at Source code of project:

begin
  Application.Initialize;
  Application.Title := '...';
  frmSplashScreen := TfrmSplashScreen.Create(Application);
  frmSplashScreen.Show;
  frmSplashScreen.Update;
  while frmSplashScreen.Timer.Enabled do
     Application.ProcessMessages;
  Application.CreateForm(TfmMain, fmMain);
  frmSplashScreen.Hide;
  frmSplashScreen.Free;
  Application.Run;
end;

In frmSplashScreen put a TTimer component named Timer and set the interval to... lets said 3000 (30")? and enabled to TRUE. And at OnTime event put this line of code:

Timer.Enabled := FALSE;

Hope this help!!
0
 
LVL 4

Expert Comment

by:spk2000ar
ID: 19113239
If last comment is going to the wrong way, review the creation of the forms, are them created by a call to Show method, or ShowModal?
How is set FormStyle in each form? try with fsStayOnTop on second dialog.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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

Suggested Solutions

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…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

738 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