#Include <WinAPIEx.au3>
Opt('MustDeclareVars', 1)
Global $hCursor, $hPrev = _WinAPI_DuplicateCursor(_WinAPI_LoadCursor(0, 32512)) ; IDC_ARROW
$hCursor = _WinAPI_DuplicateCursor(_WinAPI_LoadCursor(_WinAPI_GetModuleHandle(@SystemDir & '\shell32.dll'), 1005))
_WinAPI_SetSystemCursor($hCursor, 32512) ; OCR_NORMAL
Sleep(5000)
_WinAPI_SetSystemCursor($hPrev, 32512)
HotKeySet('{Esc}', 'End')
Global Const $USER32 = DllOpen("user32.dll")
Global Const $cDir = 'C:\WINDOWS\Resources\Themes\Tango LunaVX\Onion' ; 图标路径
;
Global Const $Cursor = $cDir & '\UpArrow.ani' ;图标文件名
Global Const $CursorBack = $cDir & '\aero_arrow_l.cur';原来的围标文件名
MouseSetCursor($Cursor) ;设置光标的图标
While 1
Sleep(10)
WEnd
Func MouseSetCursor($nCursor)
;载入
$cDll = DllCall($USER32, "hwnd", "LoadCursorFromFile", "str", $nCursor)
If @error <> 0 Then Return
;改变
DllCall($USER32, "int", "SetSystemCursor", "int", $cDll, "int", 32512)
If @error <> 0 Then Return
EndFunc ;==>MouseSetCursor
Func End()
MouseSetCursor($CursorBack);还原原始图标
Exit
EndFunc ;==>End
这个是应用于截屏时隐藏图标之用吧 你的想法是不是跟这个软件类似? sanmoking 无非要出精品了?怎么这么多悬赏帖呀? 回复 12# wuweixian
那个太贵了,买不起。 有点……………… 具体使用的例子请参考我的代码【鼠标傀儡】 回复 17# 3mile
HotKeySet('{Esc}', 'End')
#include <mousechange.au3>
Global Const $USER32 = DllOpen("user32.dll")
Global Const $Cursor = '111.ani' ;图标文件名
;~ Global Const $CursorBack = '222.ani';原来的围标文件名
$hPrev = _WinAPI_DuplicateCursor(_WinAPI_LoadCursor(0, 32512)) ;记录当前鼠标状态
MouseSetCursor($Cursor) ;设置光标的图标
While 1
Sleep(10)
WEnd
Func MouseSetCursor($nCursor)
$cDll = DllCall($USER32, "hwnd", "LoadCursorFromFile", "str", $nCursor) ;载入
If @error <> 0 Then Return
DllCall($USER32, "int", "SetSystemCursor", "int", $cDll, "int", 32512);改变
If @error <> 0 Then Return
EndFunc ;==>MouseSetCursor
Func End()
_WinAPI_SetSystemCursor($hPrev, 32512);还原原始图标
;~ MouseSetCursor($CursorBack);还原原始图标
Exit
EndFunc ;==>End
页:
1
[2]