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

//1 
MyForm := MyForm.Create(Application)
 
//2
MYForm.firstProperty  := bla; 
MYForm.xxxProperty  := bla bla; 
 
MYForm.Show;

Open in new window

LVL 8
BdLmAsked:
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.

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

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

dougaugCommented:
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.

Regards,
0

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

  public
    constructor Create(AOwner: TComponent); override;
  end;

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

  // visible becomes true before end (it calls formcreate first, then sets visible to true)
end;
0
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.
0
BdLmAuthor Commented:
may be I changed this Form from fsnormal to midchild without any further test ...., now changed the code , solution found
0
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
Delphi

From novice to tech pro — start learning today.