zoukankan      html  css  js  c++  java
  • 检测鼠标指针的改变(使用GetCursorInfo API函数)

    1. 第一步:定义全局变量用于状态改变时的对比  
    2. var  
    3. Form1: TForm1;  
    4. OldCI:HICON;  
    5.   
    6. 第二步:添加Timer组件,Interval设置随意一般50就可以了. 增加Memo组件用于记录状态改变  
    7. procedure TForm1.Timer1Timer(Sender: TObject);  
    8. var  
    9. CI: TCursorInfo;  
    10. begin  
    11. CI.cbSize := SizeOf(CI);  
    12. GetCursorInfo(CI);  
    13. if OldCI<>CI.hCursor then  
    14.     begin  
    15.       OldCI:=CI.hCursor;  
    16.       Beep;  
    17.       Memo1.Lines.Add('在坐标 X:'+inttostr(CI.ptScreenPos.X)+' Y:'+inttostr(CI.ptScreenPos.X)+' 发生改变');  
    18.     end;   
    19. end;   

    http://blog.csdn.net/qdseashore/article/details/7757190

  • 相关阅读:
    emacs command
    emacs format
    attach
    虚拟ip
    emacs redo
    mariadb
    unsafe
    select, poll, epoll
    03基于python玩转人工智能最火框架之TensorFlow介绍
    03SQL语句
  • 原文地址:https://www.cnblogs.com/findumars/p/8207425.html
Copyright © 2011-2022 走看看