Una funcion para poner el cursor de la manito en los controles.
Option Explicit
Private Type GUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(7) As Byte
End Type
Private Type PicBmp
Size As Long
type As Long
hBmp As Long
hPal As Long
Reserved As Long
End Type
Private Declare Function OleCreatePictureIndirect Lib "olepro32.dll" (PicDesc As PicBmp, RefIID As GUID, ByVal fPictureOwnsHandle As Long, IPic As IPicture) As Long
Private Declare Function LoadCursor Lib "user32" Alias "LoadCursorA" (ByVal hInstance As Long, ByVal lpCursorName As Long) As Long
Private Declare Function DestroyCursor Lib "user32" (ByVal hCursor As Long) As Long
Private Const IDC_HAND As Long = 32649
Public Function GetSystemHandCursor() As Picture
Dim Pic As PicBmp, IPic As IPicture, IID_IDispatch As GUID
Dim hCur As Long
hCur = LoadCursor(ByVal 0&, IDC_HAND)
With IID_IDispatch
.Data1 = &H20400
.Data4(0) = &HC0
.Data4(7) = &H46
End With
With Pic
.Size = Len(Pic)
.type = vbPicTypeIcon
.hBmp = hCur
.hPal = 0
End With
Call OleCreatePictureIndirect(Pic, IID_IDispatch, 1, IPic)
Set GetSystemHandCursor = IPic
DestroyCursor hCur
End Function
Private Sub Form_Load()
Me.MousePointer = vbCustom
Me.MouseIcon = GetSystemHandCursor
End Sub