Shape.VisibleChanged Event

 

Occurs when the Visible property value changes.

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

[BrowsableAttribute(true)]
public event EventHandler VisibleChanged

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

For more information about how to handle events, see Handling and Raising Events.

The following example shows how to respond to the VisibleChanged event in an event handler. This example requires that you have an OvalShape control named OvalShape1 and a RectangleShape named RectangleShape1 on a form.

private void ovalShape1_VisibleChanged(object sender, System.EventArgs e)
{
    // Switch between the oval and rectangle shapes.
    if (ovalShape1.Visible == false)
    {
        rectangleShape1.Visible = true;
    }
    else
    {
        rectangleShape1.Visible = false;
    }
}

Return to top
Show: