How to set the mouse pointer in Access?

zhaozj2021-02-16  55

How to set the mouse pointer in Access?

problem:

How to set a mouse pointer?

method one:

Private Declare Function alxSetCursor Lib "user32" Alias ​​"SetCursor" (ByVal hCursor As Long) As Long 'specified mouse pointer as the current pointer Private Declare Function alxGetCursor Lib "user32" Alias ​​"GetCursor" () As Long' Get the currently selected Mouse pointer handle

Private sub mouseType () 'acquired the value of the left and right cursors Screen.MousePointer = 9' set the screen mouse to 9 (left and right mouse). LNGMOUSEONE = alxgetcursor () 'Returns the value of the left and right mouse in Windows (2000/98 / XP). Screen.MousePointer = 7 'Sets the screen mouse to 11 (hourglass). LNGMOUSETWO = AlxgetCursor () 'Returns the value of the left and right mouse in Windows (2000/98 / XP). Screen.MousePointer = 0 'Reset screen mouse is 0 (Access Self-determination). Bltextout = false bltextlook = falsend sub

Method Two:

Just find a .cur file copy to the same directory as the MDB file

Private Declare Function CopyCursor Lib "user32" Alias ​​"CopyIcon" (ByVal hcur As Long) As LongPrivate Declare Function LoadCursorFromFile Lib "user32" Alias ​​"LoadCursorFromFileA" (ByVal lpstrCurFile As String) As LongPrivate Declare Function GetCursor Lib "user32" () As LongPrivate Declare function setsystemcursor lib "user32" (Byval Id as long) As longprivate const ocr_normal = 32512 DIM LNGMYCURSOR AS Longdim LNGSystemcursor As Long

转载请注明原文地址:https://www.9cbs.com/read-24499.html

New Post(0)