Enum ControlMousePointerType

ControlMousePointerType enumeration

Represents the type of icon displayed as the mouse pointer for the control.

public enum ControlMousePointerType

Values

NameValueDescription
Default0Standard pointer.
Arrow1Arrow.
Cross2Cross-hair pointer.
IBeam3I-beam.
SizeNESW6Double arrow pointing northeast and southwest.
SizeNS7Double arrow pointing north and south.
SizeNWSE8Double arrow pointing northwest and southeast.
SizeWE9Double arrow pointing west and east.
UpArrow10Up arrow.
HourGlass11Hourglass.
NoDrop12“Not” symbol (circle with a diagonal line) on top of the object being dragged.
AppStarting13Arrow with an hourglass.
Help14Arrow with a question mark.
SizeAll15“Size-all” cursor (arrows pointing north, south, east, and west).
Custom99Uses the icon specified by the MouseIcon property.

Examples

[C#]

namespace Demos
{
    using Aspose.Cells;
    using Aspose.Cells.Drawing;
    using Aspose.Cells.Drawing.ActiveXControls;
    using System;

    public class ControlMousePointerTypeDemo
    {
        public static void ControlMousePointerTypeExample()
        {
            // Create a new workbook
            Workbook workbook = new Workbook();

            // Add a new worksheet to the workbook
            Worksheet worksheet = workbook.Worksheets[0];

            // Add an ActiveX control to the worksheet
            var shape = worksheet.Shapes.AddActiveXControl(ControlType.ComboBox, 5, 0, 1, 0, 100, 20);
            ComboBoxActiveXControl control = (ComboBoxActiveXControl)shape.ActiveXControl;

            // Cast the ActiveXControl to ActiveXControlBase to access its properties
            ActiveXControlBase controlBase = control as ActiveXControlBase;

            if (controlBase != null)
            {
                // Set the mouse pointer type for the control
                controlBase.MousePointer = ControlMousePointerType.Cross;

                // Set other properties for demonstration
                controlBase.Width = 150;
                controlBase.Height = 50;
                controlBase.IsVisible = true;
                controlBase.Shadow = true;
                controlBase.ForeOleColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue);
                controlBase.BackOleColor = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.LightGray);
            }

            // Save the workbook
            workbook.Save("ControlMousePointerTypeExample.xlsx");
            workbook.Save("ControlMousePointerTypeExample.pdf");

            // Output the result
            Console.WriteLine("Workbook with ActiveX control and custom mouse pointer type saved as 'ControlMousePointerTypeExample.xlsx'.");
        }
    }
}

See Also