http://bbs.csdn.net/topics/270000749

delphi如何获取窗体移动事件

type   
    
      TForm1   =   class(TForm)   
    
      private   
    
      procedure   WMMOVE(var   Msg:   TMessage);   message   WM_MOVE;   
    
      end;   
    
  var   
    
      Form1:   TForm1;   
    
  implementation   
    
  {$R   *.DFM}   
    
  {   TForm1   }   
    
  procedure   TForm1.WMMOVE(var   Msg:   TMessage);   
    
  begin   
    
      Inherited;   
    
      if   (Left   <   10)   and   (Top   <   10)   and     
    
      (Left   <>   0)   and   (Top   <>   0)   then   //   设定移动到左上角   10   点范围内时贴到边上去   
    
      begin   
    
      Left   :=   0;   
    
      Top   :=   0;   
    
      Msg.Result   :=   0;   
    
      end;   
    
  end;   
    
  end.   
网上一搜多得是……