This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IG > IGlobeControl Interface > IGlobeControl.MouseIcon Property (ArcObjects .NET 10.4 SDK) |
Custom mouse icon used if MousePointer is 99.
[Visual Basic .NET]
Public Property MouseIcon As stdole.IPictureDisp
[C#]
public stdole.IPictureDisp MouseIcon {get; set;}
[C++]
HRESULT get_MouseIcon(
Picture** ppMouseIcon
);
[C++]
HRESULT putref_MouseIcon(
Picture* ppMouseIcon
);
[C++]
Parameters ppMouseIcon [out, retval]
ppMouseIcon is a parameter of type Picture ppMouseIcon [in]
ppMouseIcon is a parameter of type Picture
The MouseIcon property provides a custom icon that is used when the MousePointer property is set to esriPointerArrowHourglass (99).
In most development evironments the control's property pages can be used to load either a cursor (.cur) or icon (.ico) file. A cursor contains a custom 'hotspot' location and can be any size. The 'hotspot' location for an icon file defaults to the center of the icon. This property cannot be used to load animated cursor (.ani) files.
To programatically create an object implementing IPictureDisp there is the win32 function OleLoadPicture or helper methods depending on the development environment.
When working directly with AxControls class use the MouseIcon property as follows:
axGlobeControl1.MouseIcon=new
Icon("myIcon.ico");
axGlobeControl1.MousePointer=esriControlsMousePointer.esriPointerCustom;
When using the Controls interop assembly use the MouseIcon property as follows:
IGlobeControl globeControl=(IGlobeControl) axGlobeControl1.Object;
Icon icon=new
Icon(GetType().Assembly.GetManifestResourceStream(GetType(), "myIcon.ico"));
globeControl.MouseIcon=(stdole.IPictureDisp) ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromIcon(icon);
globeControl.MousePointer=esriControlsMousePointer.esriPointerCustom;
When working directly with AxControls class use the MouseIcon property as follows:
AxGlobeControl1.MouseIcon=New
Icon("myIcon.ico")
AxGlobeControl1.MousePointer=esriControlsMousePointer.esriPointerCustom
When using the Controls interop assembly use the MouseIcon property as follows:
Dim
globeControlAs
IGlobeControl=AxGlobeControl1.ObjectDim
myIconAs
Icon=New
Icon(GetType
(Form1).Assembly.GetManifestResourceStream(GetType
(Form1), "myIcon.ico")) globeControl.MouseIcon=ESRI.ArcGIS.ADF.COMSupport.OLE.GetIPictureDispFromIcon(myIcon) globeControl.MousePointer=esriControlsMousePointer.esriPointerCustom