动态鼠标指针

#NoEnv
#SingleInstance Force
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
ListLines Off

; 载入动态光标
FileGetSize, nSz, anicursor.ani
FileRead, Bin, *c anicursor.ani
CHAND := DllCall( "CreateIconFromResourceEx", UInt,&Bin, UInt,nSz, Int,1, UInt,0x30000, Int,0, Int,0, UInt,0x40 )

Gui, +hwndhGui
Gui, Add, Edit, w200
Gui, Show, w300 h300

SetTimer, UpdateCursor, 100
Return

GuiClose:
GuiEscape:
   DllCall( "SystemParametersInfo", UInt,SPI_SETCURSORS := 0x57, UInt,0, UInt,0, UInt,0 ) ; Reload the system cursors
ExitApp

UpdateCursor:
   MouseGetPos,,, WinID
   if (WinID = hGui)
   {
      if UsingCustomCursor
         Return

      CHAND := DllCall( "CreateIconFromResourceEx", UInt,&Bin, UInt,nSz, Int,1, UInt,0x30000, Int,0, Int,0, UInt,0x40 )
      DllCall( "SetSystemCursor", Uint,CHAND, Int,32512 )
      UsingCustomCursor := True
   }
   else if UsingCustomCursor
   {
      DllCall( "SystemParametersInfo", UInt,SPI_SETCURSORS := 0x57, UInt,0, UInt,0, UInt,0 ) ; Reload the system cursors
      UsingCustomCursor := False
   }
Return

给TA捐赠
共{{data.count}}人
人已捐赠
其他教程

动图

2020-3-9 1:36:44

其他函数

【函数】半角转全角,全角转半角,全角半角转换

2020-3-9 1:38:44

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索