Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mdi

Status
Not open for further replies.

filipe26

Programmer
Mar 17, 2003
152
PT
Hi i have changed the property of main form and another to mdiform and mdichild respectly but i didnt like the look ,so i changed again to fsnormal,and now i have a problem that is the fact that the form i changed to mdichild shows with the main form imediatly after creation without calling showmodal.Why?
 

Remove the form2 from the autocreate option.

go to project-Options.

in the FORMS tabsheet move the form2 from autocreate to available by double clicking on form2
 
Yes but when i make showmodal gives me an error because the form is not created, i think.
 
But why i have to do that,if before i had the form autocreated,and now the property is the same <<fsnormal>>?
 
AS I understand it, when you originally created the main and child forms (before they were MDI) the Child.Visible was probably False.

Once you made it a MDIChild, its Visible property got set to True (automatically).

Since you went back to fsNormal, you also need to set its Visible property back to False :)

You should probably remove it from the Autocreate anyway and then just:

with TChildForm.Create(self) do
try
if (ShowModal = mrOK) then
begin
//do some stuff - or not
end;
finally
Release;
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top