使用loadImage 加载一个光标后在一个image的onMouseDown中,设置 screen.cursor:=1;运行时,点了图片后,若不移动鼠标,光标就消失了,除非移动一下鼠标,才能看到加载进来的光标。这是为什么?如何才能立即看到效果?application.processmessage没有用的。
但是在把自定义光标改回缺省光标 screen.cursor:=crDefault,就可以立即看到箭头啊

解决方案 »

  1.   

    一般设置Image的光标吧
    1是啥光标?
      

  2.   


    var a,sec:Integer;p:TPoint;
    begin
      GetCursorPos(p);
      for a:=Low(PointArray) to High(PointArray)do
      begin
        SetCursorPos(PointArray[a].X,PointArray[a].Y); // move
    // click
        mouse_event(MOUSEEVENTF_LEFTDOWN,0,0,0,0);
        mouse_event(MOUSEEVENTF_LEFTUP,0,0,0,0);
      end;
      SetCursorPos(p.X,p.Y);
    end;
      

  3.   

    也只好模拟了。
    我用的是 windows.SendInput 函数。