通过什么方法可以把一个窗口锁定不让它移动和变大变小。
谢谢。

解决方案 »

  1.   

    Form1.BorderStyle := bsNone;
      

  2.   

    procedure WMGetMinMaxInfo(var MSG: Tmessage); message WM_GetMinMaxInfo;
    procedure TForm1.WMGetMinMaxInfo(var MSG: Tmessage);
    begin
      inherited;
      with PMinMaxInfo(MSG.lparam)^ do
      begin
        with ptMinTrackSize do
        begin
          X := Form1.Width;
          Y := Form1.Height;
        end;
        with ptMaxTrackSize do
        begin
          X := Form1.Width;
          Y := Form1.Height;
        end;
      end;
    end;
      

  3.   

    你要想不让它变大变小就:form1.BorderStyle:=bssingle
    有问题请发信息到我的E-mail:[email protected]
      

  4.   

    Form1.BorderStyle := bsNone;是一个方法
    第二个方法是:当位置变时在setwindowpos();
      

  5.   

    你要想不让它变大变小就:form1.BorderStyle:=bsdialog;
    不想移动就这样做unit Unit1;interfaceuses
      Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs;type
      TForm1 = class(TForm)
      private
        { Private declarations }
        procedure wmsys(var m:tmessage); message wm_syscommand;
      public
        { Public declarations }
      end;var
      Form1: TForm1;implementation{$R *.DFM}{ TForm1 }procedure TForm1.wmsys(var m: tmessage);
    begin
      if (m.WParam=sc_move+2) or (m.WParam=sc_move)// or (m.WParam=sc_size)
       then m.WParam:=0
      else inherited;
    end;end.