Results 1 to 6 of 6

Thread: [RESOLVED] hand mouse pointer

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Resolved [RESOLVED] hand mouse pointer

    how do i get the hand mouse pointer to show over an image, it isn't included with vb6.

    thanks in advance

    chris1990
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: hand mouse pointer

    You really don't need the image itself:
    Code:
    Option Explicit
    
    Private Const IDC_HAND = 32649&
    
    Private Declare Function LoadCursor Lib "user32" _
            Alias "LoadCursorA" _
            (ByVal hInstance As Long, _
            ByVal lpCursorName As Long) As Long
    
    Private Declare Function SetCursor Lib "user32" _
            (ByVal hCursor As Long) As Long
    
    Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
        SetCursor LoadCursor(0, IDC_HAND)
    End Sub

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Sep 2006
    Location
    Greater Manchester, UK
    Posts
    476

    Re: hand mouse pointer

    thanks
    If your question is answered then mark your thread RESOLVED and give credit to whoever answered it.

    If you fail, try and try again, its the only way to success.

  4. #4
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628

    Re: [RESOLVED] hand mouse pointer

    you can also set the mousecursor style to 99 and have the MouseIcon property the hand cursor.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

  5. #5
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: [RESOLVED] hand mouse pointer

    But that requires the actual image to be embeded in your application (say image control or resource) or physical binary file.
    Instead you get it from the source - user32 library is available on every system.

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [RESOLVED] hand mouse pointer

    Also, the closest cursor I could find that matched the hand you see in most apps is harrow.cur in %windir%\cursors. But it doesn't look that good.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width