分为这样几个工作
1、检测鼠标位置,你可以用mousemove实现
2、确定位置为指定位置以后,改变鼠标形状。
3、检测mousedown事件,并用一个变量记录鼠标当前状态为down
4、如果为down的情况下产生mousemove事件则根据mousemove的新位置改变控件的大小
5、检测mouseup事件改变状态到up并且固定控件位置(作相应的控件位置改变后的操作)

解决方案 »

  1.   

    procedure TForm1.OleContainer1MouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
    begin
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      //********************************\*******************************************
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      if ((X=0) and (Y=0)) or ((X=(Sender as TControl).Width) and (Y=(Sender as TControl).Height))
      then (Sender as TControl).Cursor := crSizeNWSE
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      //********************************/*******************************************
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      else if ((X=0) and (Y=(Sender as TControl).Height)) or ((X=(Sender as TControl).Width) and (Y=0))
      then (Sender as TControl).Cursor := crSizeNESW
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      //********************************|*******************************************
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      else if (Y=0) or (Y=(Sender as TControl).Height)
      then (Sender as TControl).Cursor := crSizeNS
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      //********************************--******************************************
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      else if (X=0) or (X=(Sender as TControl).Width)
      then (Sender as TControl).Cursor := crSizeWE
      //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      else (Sender as TControl).Cursor := crDefault;  if ssLeft in Shift then
      case (Sender as TControl).Cursor of
        crSizeNWSE: (Sender as TControl).SetBounds(;
        crSizeNESW: ;
        crSizeNS:   ;
        crSizeWE:   ;
      end;
    end;
      

  2.   

    请关注:http://www.csdn.net/expert/topic/607/607950.xml?temp=.8564417