VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

Get the Real Hand Cursor

Nathanael B  (3 Submissions)   Windows API Call/Explanation   Visual Basic 5.0   Intermediate   Wed 3rd February 2021

This small piece of code will set the cursor to the hand cursor that is shown when you hover above a hyperlink. I know you can use a .RES file to load the cursor, but the cursor can be changed in the Mouse control panel, and a .RES cursor will not reflect the changes. NOTE: This is not all my code. I found the API call on VBC (had to do quite a bit of searching), and put together a little Subroutine to make it easier to do. The original source is here: https://www.vbcoders.com/vb/scripts/ShowCode.asp?txtCodeId=31572&lngWId=1

Inputs
True/False value. If Hand=True, the hyperlink cursor will be displayed, if it is False, the standard pointer will be displayed.

API Declarations
Public Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Public Declare Function SetCursor Lib "user32" (ByVal hCursor As Long) As Long
Public Const IDC_HAND = 32649&
Public Const IDC_ARROW = 32512&

Rate Get the Real Hand Cursor (11(11 Vote))
Get the Real Hand Cursor.bas

Get the Real Hand Cursor Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters