var 
   location :tpoint;
produce form.formmousemove(...)
begin
 win32check(GetCursorPos(location));
 if location.x = ... and location.y = ... then
 begin
 ...
 ...
 end;
end;

解决方案 »

  1.   

    假設一component是button1;
    procedure Tform1.mousemove(sender:tobject;shift:tshiftstate;x,y:integer);
    with button1 do
     if x>left and x<(left+width) and y>top and  y<(top+height) then do (what you want)
     ............end;
    OK,Give Me score!!!!!!!!!
      

  2.   

    写一过程
    Procedure MouseMove(Sender: TObject; Shift: TShiftState; X,
      Y: Integer);
    Begin
    if Sender is TSpeedButton then SpeedButton1.Font.Color:=clRed
    else SpeedButton1.Font.Color:=clBlue;
    end;
    让主窗体的 OnMouseMove=MouseMove
    在窗体上放置几个 SpeedButton 按钮 也让其OnMouseMove=MouseMove
    一切那么简单 试一试
      

  3.   

    CsdnKey(函数) 的方法让我想到一个问题,就是,如何遍历窗体中所有控件?比如我要寻找某个窗体中所有edit控件,并且改变其readonly属性,请问该怎么做?