How to approach: many ActiveForms needed


2004-02-21 09:44:09 AM
cppbuilder40
Hi,
I developed a test application, in this ActiveX project, it has
one ActiveForm, and a regular TForm. On the ActiveFormCreate()
event, I am doing this:
TfrmTest *childForm;
childForm = new TfrmTest(this);
childForm->Parent = this;
childForm->Align = alClient;
childForm->BorderStyle = bsNone;
childForm->Visible = True;
This way I don't have to touch my TForm's code.
Now, my question is, what if, from this childForm, when I click
on an OK button, I now want to display yet another form, also
a TForm. Basically I want to be able to display other TForms
from other TForms (which always will be a child form of the
ActiveForm). Do I need to have one ActiveForm for each TForm?
I am not sure how each .ocx control will know of other .ocx
control's existence.
To make things more complicated, the first form I show is where
I would connect to the database, and subsequent forms I need to
stay in the same session. My ActiveX project is implemented as
a MIDAS client, so it'll use appropriate components to connect
to the MIDAS server which takes care of all the data processing.
Any help would be so much appreciated!
Thanks,
Jerri