|
-
Aug 24th, 2000, 12:58 PM
#1
Thread Starter
Hyperactive Member
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
-
Aug 24th, 2000, 01:00 PM
#2
Monday Morning Lunatic
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
-
Aug 24th, 2000, 01:06 PM
#3
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
-
Aug 24th, 2000, 01:10 PM
#4
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
-
Aug 24th, 2000, 03:56 PM
#5
Thread Starter
Hyperactive Member
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?
-
Aug 24th, 2000, 03:59 PM
#6
Monday Morning Lunatic
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
-
Aug 24th, 2000, 04:13 PM
#7
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|