1 Replies - 20352 Views - Last Post: 30 January 2011 - 05:33 AM Rate Topic: -----

#1 albertovv  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 21
  • Joined: 15-November 10

Hand mouse pointer on label

Posted 25 January 2011 - 06:00 AM

Hey guys well I got to the point were I can click on my label and it will open lotus so I can send an email however I want the mouse pointer to change to a hand with the index finger pointing when it goes over my label.

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
'email sent working perfectly
Private Const SW_SHOWNORMAL = 1

Private Sub lblSendMeMail_Click()

Dim MailMe As String
MailMe = "mailto:" & lblSendMeMail.Caption
ShellExecute 0&, "open", MailMe, vbNullString, vbNullString, SW_SHOWNORMAL
End Sub

'Pointer change not working

Private Sub lblSendMeMail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    lblSendMeMail.MouseIcon = LoadPicture("C:\Windows\Cursors\hmove.cur")
    lblSendMeMail.MousePointer = vbHourGlass
End Sub

Any help is much appreciated

Is This A Good Question/Topic? 0
  • +

Replies To: Hand mouse pointer on label

#2 FungalMonkey  Icon User is offline

  • New D.I.C Head

Reputation: 3
  • View blog
  • Posts: 37
  • Joined: 13-December 09

Re: Hand mouse pointer on label

Posted 30 January 2011 - 05:33 AM

I believe you're 99% of the way there!

Change the following

    lblSendMeMail.MousePointer = vbHourGlass 

    lblSendMeMail.MousePointer = vbCustom 

(The VB Constant '99')

and that should be that..

Hope This Helps..

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1