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!

Child forms sometimes does not appear?

Status
Not open for further replies.

dlare9

Programmer
Apr 3, 2007
12
JP
Hi to all,

I've created a application using BCB V6.
The only problem in my application is that sometimes the child forms in my application failed
to appear (or initialize). the child here is TForm and the main form is a TFrom also.
Is there something wrong in my application, Is this a bug in BCB or Do I need to adjust something in the Object Inspector of BCB?

I'm fairly new in using the BCB so most of the program I've done is by trial and error.

Any help or link would be much appreciated


p.s. I also noticed this type of behaviour in other application which has a child of TDockableForm


Regards,
Gerald
 
One the main form change the FormStyle property to fsMDIForm. On all the child forms, change the property to fsMDIChild.

If that still doesn't fix it, show us the code you use to call the child form.



James P. Cottingham
-----------------------------------------
[sup]I'm number 1,229!
I'm number 1,229![/sup]
 
Maybe my snippet can help to you.
In formshow, apply this;

if (!StartFile.IsEmpty())
CreateMDIChild(StartFile);
else
if ((EV->OpenLastFile)&&(!EV->LastFile.IsEmpty()))
CreateMDIChild(EV->LastFile);
else
if (!EV->HomeWindow.IsEmpty()) {
TMDIChild *cp = CreateMDIChild(EV->HomeWindow);
if (cp && EV->HomWinMax) cp->WindowState = wsMaximized;
}

SetFocus();
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top