0
Answer

change system cursor to default vb.net

Anatole

Anatole

14y
4.7k
1
Hello, I have a function to change my system mouse to a different mouse, but how do i change it back to the previous mouse?
Here is the code I have.
'API declarations (form level in test)
Declare Function SetSystemCursor Lib "user32.dll" ( _
ByVal hcur As Int32, _
ByVal id As Int32) As Int32
Declare Function LoadCursorFromFile Lib "user32.dll" Alias "LoadCursorFromFileA" ( _
ByVal lpFileName As String) As Int32
'constant for the "normal" cursor (main arrow graphic)
Private Const OCR_NORMAL As Int32 = 32512

'now in a sub, like button click...
SetSystemCursor((LoadCursorFromFile("C:\WINDOWS\Cursors\3dgarro.cur")), OCR_NORMAL)
Thanks,
Anatole