Topic: MDIChild maximize
Help to solve the task with the strange behavior of forms please.
There is an application from three forms, one with style MDIForm and two Normal.
Here the code.
procedure TForm1.N11Click (Sender: TObject); begin Form2.Free; Form2: = TForm2.Create (application); Form2.FormStyle: = fsMDIChild; Form2.Show; SendMessage (Form2.Handle, WM_SYSCOMMAND, SC_MAXIMIZE, 0) end; procedure TForm1.N21Click (Sender: TObject); begin Form3.Free; Form3: = TForm3.Create (application); Form3.FormStyle: = fsMDIChild; Form3.Show; SendMessage (Form3.Handle, WM_SYSCOMMAND, SC_MAXIMIZE, 0) end;
What turns out?
We click on the first menu item, there is a form and is maximized in the principal form, we click on the second menu item there is a form and the PRINCIPAL form on all screen. It is possible to click in reverse sequence, the same effect. The first cliques maximizes the child form, the second - PRINCIPAL.
How to make that the principal it was not maximized???