Occurs when the user changes the active shape object.
            
 Syntax
Syntax
| Visual Basic (Declaration) |  | 
|---|
| Public Event ShapeActivated As EventHandler | 
| Visual Basic (Usage) |  Copy Code | 
|---|
| Dim instance As FpSpread
Dim handler As EventHandler
 
AddHandler instance.ShapeActivated, handler | 
Remarks
            
             Example
Example
This example puts text in a textbox when the shape is activated.
             
| C# |  Copy Code | 
|---|
| private void Form1_Load(object sender, System.EventArgs e)
{
     FarPoint.Win.Spread.DrawingSpace.RectangleShape rShape = new FarPoint.Win.Spread.DrawingSpace.RectangleShape();
     // Assign a name, overriding the unique default assigned name. 
     rShape.Name = "myRect1";
     // Assign a location at which to start the display of the shape. 
     rShape.Top = 20;
     rShape.Left = 60;
     // Assign a custom fill color to the shape. 
     rShape.BackColor = Color.Blue;
     // Assign a size to the shape.
     rShape.Width = 100;
     rShape.Height = 100;
     // Add the shape to the sheet so that it appears on that sheet. 
     fpSpread1.ActiveSheet.AddShape(rShape); 
}
private void fpSpread1_ShapeActivated(object sender, System.EventArgs e)
{
     textBox1.Text = "Shape Activated";
}
 | 
| Visual Basic |  Copy Code | 
|---|
| Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
     Dim rShape As New FarPoint.Win.Spread.DrawingSpace.RectangleShape
     ' Assign a name, overriding the unique default assigned name. 
     rShape.Name = "myRect1" 
     ' Assign a location at which to start the display of the shape. 
     rShape.Top = 20
     rShape.Left = 60
     ' Assign a custom fill color to the shape. 
     rShape.BackColor = Color.Blue
     ' Assign a size to the shape.
     rShape.Width = 100
     rShape.Height = 100
     ' Add the shape to the sheet so that it appears on that sheet. 
     FpSpread1.ActiveSheet.AddShape(rShape)
End Sub
Private Sub FpSpread1_ShapeActivated(ByVal sender As Object, ByVal e As System.EventArgs) Handles FpSpread1.ShapeActivated
     TextBox1.Text = "Shape Activated"
End Sub
 | 
 Requirements
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
 See Also
See Also