Dafly
Dec 30th, 1999, 03:50 AM
Hi what I am trying to do is when the user holds down the 'Shift' key and the left mouse button the Cursor changes from the Arrow to a diffrent Image Not just on the form but on all of the other programs, I have it to were it changes the Cursor Image but it returns the cursor Image back to the arrow after the mouse is moved. the code i have is.
Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim z as long
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyShift) Then
If GetAsyncKeyState(vbLeftButton) Then
SetCursor z
End If
End If
End Sub
Private Sub Form_Load()
z = LoadCursorFromFile("Icon.cur")
End Sub
Is their away to set the system mouse pointer to one that I specifiy, or is their an better way to do this?
Thank you,
Jeremy
------------------
Dafly98@aol.com
Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Declare Function LoadCursorFromFile Lib "user32" Alias "LoadCursorFromFileA" (ByVal lpFileName As String) As Long
Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Dim z as long
Private Sub Timer1_Timer()
If GetAsyncKeyState(vbKeyShift) Then
If GetAsyncKeyState(vbLeftButton) Then
SetCursor z
End If
End If
End Sub
Private Sub Form_Load()
z = LoadCursorFromFile("Icon.cur")
End Sub
Is their away to set the system mouse pointer to one that I specifiy, or is their an better way to do this?
Thank you,
Jeremy
------------------
Dafly98@aol.com