Results 1 to 7 of 7

Thread: speaking of hyperlinking...

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Wink

    while we are discussing the hyperlink thing, can someone show me how to change the mouse pointer to the hand icon when it is over a hyperlink? I have the link in a label called lblHyperlink. I know it will have something to do with either the label's or the form's mousemove routine, but as I have never used that routine before, I am clueless!

    Also, does anyone have the .ico file for the hand pointer? I can't find it.

    Thanks

    Andrew

  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It is the Label's MouseMove routine. The icon for the hand is located in iexplore.exe
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Try this:
    'put an image and name it - imgHand
    Private Const SW_SHOWNORMAL = 1

    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.MousePointer = vbDefault

    End Sub

    Private Sub lblHyperlink_Click()
    lReturn = ShellExecute(hWnd, "open", "www.vb-world.net", vbNull, vbNull, SW_SHOWNORMAL)

    End Sub

    Private Sub lblHyperlink_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.MousePointer = 99
    Me.MouseIcon = imgHand.Picture

    End Sub

  4. #4
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Sorry the code got mixed up !!


    Option Explicit
    Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
    Private Const SW_SHOWNORMAL = 1

    Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.MousePointer = vbDefault
    End Sub

    Private Sub lblHyperlink_Click()
    Dim lReturn As Long
    lReturn = ShellExecute(hWnd, "open", "www.vb-world.net", vbNull, vbNull, SW_SHOWNORMAL)

    End Sub

    Private Sub lblHyperlink_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    Me.MousePointer = 99
    Me.MouseIcon = imgHand.Picture
    End Sub

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374

    Unhappy

    Okay, that works for changing the icon. but parksie - iexplore.exe is a program and not a folder. Also I searched for all *.ico files on my system and still couldn't find it. It is an .ico file, right?

  6. #6
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    It is not stored in an .ico file, and it is stored INSIDE iexplore.exe. However, there is a .cur file for it supplied with Windows 2000 - so here it is: http://www.parksie.uklinux.net/Harrow.cur
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  7. #7

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 1999
    Location
    Columbia, SC USA
    Posts
    374
    Ah! Okay, gotcha. Thanks for the link, but I don't need it now since i looked in the Cursors folder in visual studio, and there are several of them.

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