|
|
Title | Use a custom mouse icon at run time |
Description | This example shows how to use a custom mouse icon at run time in Visual Basic 6. It sets the form's MousePointer property to 99 - Custom and then sets the MouseIcon property to the icon's image. |
Keywords | mouse icon, mouse pointer, pointer, MousePointer |
Categories | Graphics |
|
|
At design time, the form's MousePointer property was set to "99 - Custom."
When you click one of the form's Image controls at run time, the program highlights that control and sets the form's MouseIcon property to the Image control's picture.
|
|
Private m_SelectedIcon As Integer
Private Sub imgIcon_Click(Index As Integer)
' Highlight the selected icon.
imgIcon(m_SelectedIcon).BorderStyle = vbBSNone
m_SelectedIcon = Index
imgIcon(m_SelectedIcon).BorderStyle = vbFixedSingle
' Set the mouse icon.
MouseIcon = imgIcon(m_SelectedIcon).Picture
End Sub
|
|
|
|
|
|