Hide

SftDirectory 3.5 - ActiveX File/Folder Control

Display
Print

SftDirectory.MouseIconH Property

Defines a custom mouse icon using a Windows icon handle.

Syntax

Get

VB.NETIconHandle = object.MouseIconH As Integer
VBIconHandle = object.MouseIconH As OLE_HANDLE
C#.NETint IconHandle = object.MouseIconH;
VC++OLE_HANDLE IconHandle = object->MouseIconH;
OLE_HANDLE IconHandle = object->GetMouseIconH();
CHRESULT object->get_MouseIconH(OLE_HANDLE* IconHandle);

Put

VB.NETobject.MouseIconH = IconHandle As Integer
VBobject.MouseIconH = IconHandle As OLE_HANDLE
C#.NETint object.MouseIconH = IconHandle;
VC++OLE_HANDLE object->MouseIconH = IconHandle;
void object->PutMouseIconH(OLE_HANDLE IconHandle);
CHRESULT object->put_MouseIconH(OLE_HANDLE IconHandle);

object

A SftDirectory object.

IconHandle

Defines a custom mouse icon using a Windows icon handle.

Comments

The MouseIconH property defines a custom mouse icon using a Windows icon handle.

The MouseIconH property provides a custom icon that is used when the MousePointer property is set to sftCustom (99). This mouse pointer is displayed when the cursor is located anywhere on the control.

Examples

VB.NET

Dim Ic As Icon
Ic = New Icon("C:\path-to-icon\youricon.ico")
AxSftDirectory1.MouseIconH = Ic.Handle.ToInt32()
AxSftDirectory1.MousePointer = SftMousePointerConstants.sftCustom

C#

Icon Ic = new Icon(@"C:\path-to-icon\youricon.ico");
axSftDirectory1.MouseIconH = (int) Ic.Handle;
axSftDirectory1.MousePointer = SftMousePointerConstants.sftCustom;

C++

ISftDirectoryPtr vDir1 = m_Dir1.GetControlUnknown();
HICON hIcon = LoadIcon(NULL, MAKEINTRESOURCE(IDI_WINLOGO));
vDir1->put_MouseIconH((OLE_HANDLE)hIcon);
vDir1->put_MousePointer(sftCustom);

See Also SftDirectory Object | Object Hierarchy


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.