Technology Learning

导航

不可移动的窗体

 procedure windowsposchange(var Msg:TWMWINDOWPOSCHANGING);message WM_WINDOWPOSCHANGING;

 

var
  Form13: TForm13;
  //
  oleft:integer;
  otop:integer;
  owidth:integer;
  oHeight:integer;


implementation

{$R *.dfm}

procedure TForm13.FormCreate(Sender: TObject);
begin
oleft:=Left;
otop:=Top;
owidth:=Width;
oheight:=Height;
end;

procedure TForm13.windowsposchange(var Msg:TWMWINDOWPOSCHANGING);
begin
  Msg.WindowPos.x:=oleft;
  Msg.windowpos.y:=otop;
  Msg.windowpos.cx:=owidth;
  Msg.windowpos.cy:=oheight;
  inherited;
end;

 

posted on 2010-03-29 22:51  浔阳渔夫  阅读(259)  评论(0编辑  收藏  举报