Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Form inside MainForm

Posted on 1998-11-28
9
Medium Priority
?
211 Views
Last Modified: 2010-04-04
My application consists of one main form and couple of other forms. I am wondering if it is possible to keep all forms created inside the client area of the main form so that if I minimize or move the main form, all other opened form will still be kept inside the main form's client area.

Any idea will be appreciated !

Raymond
0
Comment
Question by:chan3898
  • 4
  • 2
  • 2
  • +1
9 Comments
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1348279
hi chan3898,

make a mdi-application. See delphi examples.

meikl
0
 

Author Comment

by:chan3898
ID: 1348280
Is there other possible way beside using MDI-application.
0
 
LVL 3

Accepted Solution

by:
Matvey earned 200 total points
ID: 1348281
Of course! Just make the other forms' parent the main form. I already tried this - what you get is simply windows drawn inside the main window, with tha ability to drag and close, and you can operate on it like any other window. Hope this is better for you than an MDI application...

--Matvey
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Expert Comment

by:Aleq
ID: 1348282
Only hook a wm_move message a move windows when the main one has been moved....
0
 
LVL 3

Expert Comment

by:Matvey
ID: 1348283
BTW, this way you can make your form to be a parent even for a window from a different application, the Windows Explorer for example, or anything else, using the SetParent API.
0
 

Author Comment

by:chan3898
ID: 1348284
I have tested your suggestion by making a new application with two forms (Form1 and Form2).  Form2 will be created using the following statement :
   Form2 := TForm2.create(Self);   // inside Form1's

However, Form2 doesn't move when I move Form1 around the screen.

Any more suggestion ?

Thank you !
0
 
LVL 27

Expert Comment

by:kretzschmar
ID: 1348285
hi chan3898,

try this

procedure TForm1.FormCreate(Sender: TObject);
begin
  Form2 := TForm2.Create(Self);
  Form2.Parent := Form1;
  Form2.show;
end;

meikl
0
 

Author Comment

by:chan3898
ID: 1348286
Thank you, I have got what I want.
0
 

Author Comment

by:chan3898
ID: 1348287
Thank you, I have got what I want.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question