Home > Back-end >  C Builder XE child form location has been before the main form, how to change?
C Builder XE child form location has been before the main form, how to change?

Time:09-17

Situation is that, through a new c + + Builder XE VCL Forms Application, by default Form1, then create a new Form, by default, for Form2
On Form1 to add a button to call Form2, Form1 and Form2 FormStyle property are fsNormal, why every time call Form2, form always before Form1, even if I click Form1 that Form1 called activity forms, but still below the Form2, which help explain, thank you!

CodePudding user response:

His top!
Added to my intention is to click on the main forms as the main form of set-top, click the child form the child form placed at the top

CodePudding user response:

You use Form2. ShowModal, to Form2. Show

CodePudding user response:

Not, is to use Form2. The Show (); As shown in the figure below

CodePudding user response:

Estimation is your form2 style set to top, some form2, FormStyle change in the Object Inspector fsNormal,

CodePudding user response:

Just try, do have the building Lord,

On Form1, however, two buttons, respectively Show Form2 and Form3, can realize the click Form2 Form2 set-top, click Form3 Form3 settop,

Should be Form1 was mainly the default form ~ ~

CodePudding user response:

With Delphi try not ah, how would you try you Create Form2, no compiler automatically Create Form2

CodePudding user response:

@ play big shoot early nuclear war: FormStyle property is set to fsNormal

CodePudding user response:

@ hongss: I had a development project, there is a main form, many child form, through the main form to child form all calls out, click any a form will make the top, and not doing extra code inside top processing, so I just wondering, this is how to implement, than in the attribute set form, are all the same.

CodePudding user response:

Why not use MDI form? Main form FormStyle set to fsMDIForm, other child form set fsMDIChild

CodePudding user response:

I had a development project, there is a main form, many child form, through the main form to child form all calls out, click any a form will make the top, and not doing extra code inside top processing, so I just wondering, this is how to implement, than in the attribute set form, are all the same.
-- -- -- -- -- -- -- --
Look at the code in the presence of CreateParams function,

CodePudding user response:

Window fsNormal FormStyle property of all, in this way, call or click any a form, it is front-facing,
  • Related