Board index » delphi » Minimum Form Size

Minimum Form Size

Is it possible to set  minumum width, or height, for a form?
 

Re:Minimum Form Size


Quote
"Craig Reynolds" wrote:
> Is it possible to set  minumum width, or height, for a form?

You can control this in the Form's OnCanResize event.

-ThomasN

Re:Minimum Form Size


"Craig Reynolds" <reynoldscra...@hotmail.com> schrieb im Newsbeitrag news:3a9f3794$0$24231@echo-01.iinet.net.au...

Quote
> Is it possible to set  minumum width, or height, for a form?

In Delphi 5 you can use the Constraints property of the form.

Otherwise you can handle the wm_getminmaxinfo message:

type
  TForm1 = class(TForm)
    {..}
 protected
  procedure WMGETMINMAXINFO(var Msg:TMessage); message wm_getminmaxinfo;
{...}
end;

implementation

procedure TForm1.WMGETMINMAXINFO(var Msg:TMessage);
begin
     with PMinMaxInfo(Msg.lParam)^ do begin
          ptMinTrackSize.X:=620; {minimum horizontal size}
          ptMinTrackSize.Y:=348; {minimum vertical size}
     end;
     Msg.Result:=0;
end;

Hth,
Matthias.

Re:Minimum Form Size


I'm using Delphi 4 so there is no constraints option

Quote
"Craig Reynolds" <reynoldscra...@hotmail.com> wrote in message

news:3a9f3794$0$24231@echo-01.iinet.net.au...
Quote
> Is it possible to set  minumum width, or height, for a form?

Re:Minimum Form Size


You are correct, I must be going blind. Damn!

"Phil Rogers (AKA Buck)" <b...@dryicecomputing.com> wrote in message
news:P9ugOtQC8kMxw5Axs3crPUcuJgkW@4ax.com...

Quote
> "Craig Reynolds" <reynoldscra...@hotmail.com> wrote:

> >I'm using Delphi 4 so there is no constraints option

> >"Craig Reynolds" <reynoldscra...@hotmail.com> wrote in message
> >news:3a9f3794$0$24231@echo-01.iinet.net.au...
> >> Is it possible to set  minumum width, or height, for a form?

> I have Delphi 4 Professional and there is most definitely a
> Constraints property available to me.

> If your version doesn't have it, you'll have to trap the form's
> OnResize event.

> --
> Buck Rogers
> www.DryIceComputing.com

Other Threads