Hi, i apologize if this is in the wrong section (First Post);
i am fairly new to delphi / pascal but was wondering how to create a form within a form, e.g. click a button on Form1 to open Form2, i am aware that tform.create is a function but am not sure how to use it,
i would appreciate an answer :)
there is more than one way ....
1. When Form2 is an autocreate Form ( Delphi Application automatically creates the Form at the start ot the Application ) :
In this case it is enough to Show the Form2, without create it, because it is already created:
2. When Form2 is not an autocreate Form :
In this case firs you have to Create the Form, Show it and Destroy it after it's usage:
There is a third way when the Application is Multi Document Interface: Property of the Form1 FormStyle is set as fsMDIForm, and property of the Form2 FormStyle is set as fsMDIChild, so Form2 will appears really inside the Form1
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...