Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Minimise forms

Posted on 2007-03-27
6
Medium Priority
?
185 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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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 500 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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
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…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

636 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