Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2006, 07:09 AM
EhsanSh EhsanSh is offline
Senior Member
 
Join Date: Jun 2003
Posts: 183
Default Hiding Form After First Show

Hi There.
I Want When My Application Starts My Main Form Doesn't Show But On Show And On Create And On Activate Of Main Form Must Execute.
Please Help Me.

[COLOR=red]ThanX To All Of You Which At Least Think About My Question.[/COLOR=red]
I'm Learning Every Day. So Please Help Me In My Job!
[COLOR=green]I Always Accept True Answers.[/COLOR=green]
[COLOR=red]Ehsan Shirzadi[/COLOR=red]
Reply With Quote
  #2  
Old 02-05-2006, 09:10 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: Hiding Form After First Show

If the form doesn't show then except for the OnCreate event, the others won't execute...ofcourse you can execute them "manually" from the OnCreate event:

[delphi]procedure TForm1.FormCreate(Sender: TObject);
begin
...
FormShow(Sender);
FormActivate(Sender);
end;[/delphi]

Hope that helps...

gLes
Reply With Quote
  #3  
Old 02-05-2006, 09:22 AM
EhsanSh EhsanSh is offline
Senior Member
 
Join Date: Jun 2003
Posts: 183
Default RE: Hiding Form After First Show

ThanX For Your Answer But How Can I Hide My Main Form In OnCreate?
When I Use Form1.Hide Or Form1.Visible:=False Nothing Will Happends.
I Dont Want To Show My Main Form To User Just When Application Starts.
If User Wants To View Form He Can Do This From Tray Icon But As Default I Want To Hide My Form When Application Starts.
ThanX

[COLOR=red]ThanX To All Of You Which At Least Think About My Question.[/COLOR=red]
I'm Learning Every Day. So Please Help Me In My Job!
[COLOR=green]I Always Accept True Answers.[/COLOR=green]
[COLOR=red]Ehsan Shirzadi[/COLOR=red]
Reply With Quote
  #4  
Old 02-05-2006, 11:31 AM
gLes gLes is offline
Senior Member
 
Join Date: Jan 2001
Posts: 2,273
Default RE: Hiding Form After First Show

Go to Project menu, select View Source, now enter this line before Application.Run;

[delphi]Application.ShowMainForm := False;[/delphi]

Hope that helps...


gLes
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 11:51 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2017, vBulletin Solutions, Inc.