Board index » delphi » MDI-child form not resizeable ?

MDI-child form not resizeable ?

How to make a MDI-child form not resizeable (I dont want to use
bsSingle) and how to set a MDI-child to a specific size when I create
one.
There is a SendMessage or Windows API (wm_size) but cant get it to
work.
Please send me some example.
 

Re:MDI-child form not resizeable ?


Use the position property of the form and put it to poDesigned. This will mess
up the Cascase option for child windows since Cascade will resize and position
all child forms from the upper left to the lower right. croner of the main form.

Quote
tom_hammarb...@vtc.volvo.se (Tom Hammarberg) wrote:
>How to make a MDI-child form not resizeable (I dont want to use
>bsSingle) and how to set a MDI-child to a specific size when I create
>one.
>There is a SendMessage or Windows API (wm_size) but cant get it to
>work.
>Please send me some example.

Ben van Mierlo (b...@bart.nl)

Re:MDI-child form not resizeable ?


On Sat, 20 Apr 1996 20:43:47 GMT, tom_hammarb...@vtc.volvo.se (Tom

Quote
Hammarberg) wrote:
>How to make a MDI-child form not resizeable (I dont want to use
>bsSingle) and how to set a MDI-child to a specific size when I create
>one.
>There is a SendMessage or Windows API (wm_size) but cant get it to
>work.
>Please send me some example.

Here is a code from BPW 7.0. The minimal size for this childwindow is
h 300 w 300. You need to modify it a little for Delphi but it works
perfectly.

procedure TChildWindow.WMGetMinMaxInfo(var Msg: TMessage);
type
  TPointArray = array [0..4] of TPoint;
  PPointArray = ^TPointArray;
begin
  PPointArray(Msg.LParam)^[3].X := 300;
  PPointArray(Msg.LParam)^[3].Y := 300;
end;

Best regards

Fabio

Re:MDI-child form not resizeable ?


Quote
>How to make a MDI-child form not resizeable (I dont want to use
>bsSingle) and how to set a MDI-child to a specific size when I create
>one.
>There is a SendMessage or Windows API (wm_size) but cant get it to
>work.

You could probably achieve this by intercepting the WM_GETMINMAXINFO
message and setting the values that you want, but really mdi is not
meant to work like this.

Wade

Other Threads