Hi there.<br><br>I'm trying to write a MDI application in Lazarus (Win32/Vista, Lazarus 0.9.31).<br><br>I created the main form and set its FormStyle property to fsMDIForm. Then I created the child form and set its FormsStyle to fsMDIChild.<br>
<br>I also created a menu where I can start a new form. I moved the child form the non-automatic-created form list. And used the following code to create it:<br><br>-----------------<br>procedure TfrmMain.mnuEntrarDadosClick(Sender: TObject);<br>
var frmChild: TfrmRelatVend;<br>begin<br>    frmChild := TfrmRelatVend.Create(self);<br>    frmChild.Show;<br>end; <br>-----------------<br><br>I also wrote a formClose handler for the child so it gets freed when I close it.<br>
-----------------<br>procedure TfrmRelatVend.FormClose(Sender: TObject;<br>    var CloseAction: TCloseAction);<br>begin<br>    CloseAction := caFree;<br>end;  <br>-----------------<br><br>Altough the form gets created and shows up, it does not have a MDI behavior, eg, it does not "stay" in the limits of its parent form and it gets maximized on top of its parent form.<br>
<br>What am I doing wrong?<br><br>thank you<br><br clear="all"><br>-- <br>Daniel<br><br>"Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do." (Donald Knuth)<br>
<br>"Yes, technogeeks can be funny, even if only to each other." (<a href="http://www.boogieonline.com/revolution/science/humor/">http://www.boogieonline.com/revolution/science/humor/</a>)"<br><br>"Man is driven to create; I know I really love to create things. And while I'm not good at painting, drawing, or music, I can write software." (Yukihiro Matsumoto, a.k.a. ``Matz'')<br>