Delphi Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming Languages - MoreDelphi Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 16th, 2012, 04:41 AM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 33 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 35 m 31 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
Automatic show of Form after Create it

I'm making maintenance in a legacy application. In some place a Form is created(e.g., the Create method is called) and the form is created and showed without explicit call to Show method.

I try to modify certains properties of the Form but I can't discover what's happening and/or change this Form behaviour.

I would never see this type of form usage.

Could someone explain me wht's happening here?

Greetings from São Paulo - Brazil

Ricardo

Reply With Quote
  #2  
Old November 16th, 2012, 09:23 AM
bummi bummi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Location: Augsburg Germany
Posts: 12 bummi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 12 m 15 sec
Reputation Power: 0
Forms have a visible Property.
If a Form is a MDIChild this property is set to true and can't be changed to false.

Reply With Quote
  #3  
Old November 16th, 2012, 10:17 AM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 33 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 35 m 31 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
Some questions:
1. If this is the reason, why events On Show e OnActivate occur before que call to Create on the MDIParent form ends?

2. I try to change the FormStyle property of the child form to fsMDIForm, fsNormal and fsStayOnTop and the described form behaviour doesn't change anyway...

Cheers

Ricardo

Reply With Quote
  #4  
Old November 16th, 2012, 11:14 AM
bummi bummi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Location: Augsburg Germany
Posts: 12 bummi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 12 m 15 sec
Reputation Power: 0
I'm not sure if I understood you right. Do you mean
[delphi]
Tform4.Create(self);
Showmessage('After call');


procedure TForm4.FormCreate(Sender: TObject);
begin
Showmessage('Create')
end;

procedure TForm4.FormShow(Sender: TObject);
begin
Showmessage('Show')
end;

[/delphi]


"After call" will be shown last.
If you need a MDICHild you have no Option ... you have to find to place your required code.
If you won't need MDIChild, just change Formstyle to normal, uncheck visible and remove it from automatic creation in your project.

Reply With Quote
  #5  
Old November 16th, 2012, 12:41 PM
nightrider43 nightrider43 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2012
Location: São Paulo - Brazil
Posts: 33 nightrider43 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 35 m 31 sec
Reputation Power: 1
Send a message via ICQ to nightrider43 Send a message via MSN to nightrider43 Send a message via Google Talk to nightrider43 Send a message via Skype to nightrider43
Hi Bummi!

You catch the idea and solve my doubts about this matter.

Cheers

Ricardo

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreDelphi Programming > Automatic show of Form after Create it

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap