使整个窗体象标题栏一样

阅读:178次   时间:2003-08-15 00:00:00   字体:[ ]
uses 
    Messages; 
  ... 
  public 
    procedure WMNCHitTest(var Message: TWMNCHitTest); message 
WM_NCHITTEST; 
  end; 
  ... 
  procedure TForm1.WMNCHitTest(var Message: TWMNCHitTest); 
  var 
    P: TPoint; 
  begin 
    inherited; 
    P := ScreenToClient(SmallPointToPoint(Message.Pos)); 
    with imgTitle do 
      if (P.X >= Left) and (P.X < Left + Width) and (P.Y >= Top) and 
(P.Y < Top + Height) then 
        Message.Result := htCaption; 
  end; 

关于本站 - 广告服务 - 会员指南 - 联系方法
Copyright ©2003-2011 源码天空 All Rights Reserved