Hello
I'd like to show an MDI child window that will use the whole client area, ie. the grey part no the right-side of the taskpane, and have the child window show its titlebar and borders:
http://img149.imageshack.us/img149/3204/delphimdichildwindowwit.jpg
Here's the code, which doesn't work as planned:
procedure TForm1.RzGroup1Items0Click(Sender: TObject);
var
Form2 : TForm2;
begin
Form2 := TForm2.Create(Application);
//BAD : doesn't start at 0,0, and triggers horizontal scrollbar
Form2.Align := alClient;
//BAD : doesn't show titlebar and borders
Form2.WindowState := wsMaximized;
//BAD : window exceeds width -> horizontal scrollbar shown
Form2.top := 0;
Form2.Left := 0;
Form2.Width := Self.ClientWidth;
Form2.Height := Self.ClientHeight;
end;
Is there a way to do this, besides computing the coordinates myself (eg. ClientWidth, etc.)?
Thank you.