Custom Mousepointer "Out of Memory"

usr_X

Registered User.
Local time
Yesterday, 19:17
Joined
Jun 9, 2009
Messages
26
Access runs out of memory when I use the following code to create a custom mouse pointer, if the mouse pointer moves over the text box for any period of time. Does anyone know how to fix this problem? Help is appreciated.

Code:
Declare Function LoadCursorFromFile Lib "user32" Alias _
   "LoadCursorFromFileA" (ByVal lpFileName As String) As Long

Declare Function SetCursor Lib "user32" _
   (ByVal hCursor As Long) As Long

Function PointM(strPathToCursor As String)
   
   Dim IngRet As Long
   IngRet = LoadCursorFromFile(strPathToCursor)
   IngRet = SetCursor(IngRet)

End Function

*****

Private Sub Text0_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

   PointM (CurrentProject.Path & "\Download and test\test.cur")

End Sub
 

Users who are viewing this thread

Back
Top Bottom