다음을 통해 공유


MouseIcon Property (Automation Only)

MouseIcon Property (Automation Only)

Gets or sets the custom mouse icon.

Declaration

[C++]

[C++]

[propputref] HRESULT putref_MouseIcon (
    [in] IPictureDisp* MouseIcon
);
[propput] HRESULT put_MouseIcon (
    [in] IPictureDisp* MouseIcon
);
[propget] HRESULT get_MouseIcon (
    [out, retval] IPictureDisp** MouseIcon
);

      

[Microsoft® Visual Basic® 6.0]

[Visual Basic]

Public Property Get MouseIcon() As IPictureDisp
Public Property Let/Set MouseIcon( _
    ByVal theMouseIcon As IPictureDisp)

      

Property Value

IPictureDisp The custom mouse icon. The default value is NULL (Nothing in Visual Basic 6.0).

This property is read/write.

Return Value

HRESULT value Description
S_OK Success.
E_POINTER The parameter is an invalid pointer.
E_UNEXPECTED Unexpected parameter or property type.
E_INK_EXCEPTION An exception occurred while processing.
E_INVALIDARG The recognition range is invalid.

Remarks

The [propputref] function can accept a NULL reference, in which case S_OK is returned.

This property provides a custom icon that is used when the MousePointer property is set to IMP_Custom.

You can use the MouseIcon property to load either cursor or icon files. The MouseIcon property provides your application with access to custom cursors of any size with any desired hot spot location.

Applies To