Strange Error: from Create automatically jump to ShowForm

I have to re-debug a once running application.
The Error is npw /recently like this:
from the from.Create function (Line #1) to execution immeadiatly jumps to FormShow,
then calling/executing line //2 and then not executing MYForm.Show; because the form is already
visible after Form.Create.
Any ggod idea what might be the reaon ?

Form Properties:

onCreate -> CreateFunction
onShow ->FormShow Function

MyForm := MyForm.Create(Application)
MYForm.firstProperty  := bla; 
MYForm.xxxProperty  := bla bla; 

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Look at the forms Visible property in the object inspector, it is probably set to True.
BdLmAuthor Commented:
It is a MDI Form, can't set visible to False :-(
What are the properties you need to set before the form is shown?
Angular Fundamentals

Learn the fundamentals of Angular 2, a JavaScript framework for developing dynamic single page applications.

Does the form MyForm has the property formStyle = MdiChild?
If yes, maybe this is the cause, because MDIChild forms become visible when they are created.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Geert GOracle dbaCommented:
check the OldCreateOrder property of the form
set it to false

override the constructor of the mdi child to set properties

    constructor Create(AOwner: TComponent); override;

constructor TChildForm.Create(AOwner: TComponent);
  inherited Create(AOwner);
  // set properties here

  // visible becomes true before end (it calls formcreate first, then sets visible to true)
Eddie ShipmanAll-around developerCommented:
Have you deleted all the DCU's and done a rebuild? Sounds like you may have an old DCU hanging out there in the path somewhere.
BdLmAuthor Commented:
may be I changed this Form from fsnormal to midchild without any further test ...., now changed the code , solution found
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.