Share via


Shape.CursorChanged Event

Occurs when the value of the Cursor property changes.

Namespace:  Microsoft.VisualBasic.PowerPacks
Assembly:  Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)

Syntax

'Declaration
<BrowsableAttribute(True)> _
Public Event CursorChanged As EventHandler
'Usage
Dim instance As Shape 
Dim handler As EventHandler 

AddHandler instance.CursorChanged, handler
[BrowsableAttribute(true)]
public event EventHandler CursorChanged
[BrowsableAttribute(true)]
public:
 event EventHandler^ CursorChanged {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
JScript does not support events.

Remarks

This event is raised if the Cursor property is changed by either a programmatic modification or user interaction.

For more information about how to handle events, see Consuming Events.

Examples

The following example displays a message in the status bar when a change occurs to the Cursor property. This example requires that you have a RectangleShape control named RectangleShape1 and a StatusStrip control named StatusStrip1 on a form. The StatusStrip must have a ToolStripStatusLabel named ToolStripStatusLabel1.

Private Sub RectangleShape1_CursorChanged(ByVal sender As Object, _
  ByVal e As System.EventArgs) Handles RectangleShape1.CursorChanged
    ToolStripStatusLabel1.Text = "This shape is currently disabled." 
End Sub
private void rectangleShape1_CursorChanged(object sender, System.EventArgs e)
{
    toolStripStatusLabel1.Text = "This shape is currently disabled.";
}

.NET Framework Security

See Also

Reference

Shape Class

Shape Members

Microsoft.VisualBasic.PowerPacks Namespace

Other Resources

How to: Draw Lines with the LineShape Control (Visual Studio)

How to: Draw Shapes with the OvalShape and RectangleShape Controls (Visual Studio)

Introduction to the Line and Shape Controls (Visual Studio)