Evento SimpleShape.Resize

Ocorre quando o tamanho de uma forma é alterado.

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

Sintaxe

'Declaração
<BrowsableAttribute(True)> _
Public Event Resize As EventHandler
[BrowsableAttribute(true)]
public event EventHandler Resize
[BrowsableAttribute(true)]
public:
 event EventHandler^ Resize {
    void add (EventHandler^ value);
    void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member Resize : IEvent<EventHandler,
    EventArgs>
JScript não oferece suporte a eventos.

Comentários

Este evento é gerado se o tamanho de uma forma é alterado por uma modificação através de programação ou a interação do usuário.

Para obter mais informações sobre como manipular eventos, consulte Consumindo eventos.

Exemplos

O exemplo a seguir mostra como responder para o Resize evento em um manipulador de eventos.Este exemplo requer que você tenha duas RectangleShape controles denominados RectangleShape1 e RectangleShape2 em um formulário.

Private Sub RectangleShape1_Resize() Handles RectangleShape1.Resize
    ' If the second rectangle intersects with the first, move it.
    If RectangleShape1.ClientRectangle.IntersectsWith( 
      RectangleShape2.ClientRectangle) Then
        RectangleShape2.Location = New Point(RectangleShape1.Right, 
          RectangleShape1.Bottom)
    End If
End Sub
private void rectangleShape1_Resize(object sender, System.EventArgs e)
{
    // If the second rectangle intersects with the first, move it.
    if (rectangleShape1.ClientRectangle.IntersectsWith(rectangleShape2.ClientRectangle))
    {
        rectangleShape2.Location = new Point(rectangleShape1.Right, 
            rectangleShape1.Bottom);
    }
}

Segurança do .NET Framework

Consulte também

Referência

SimpleShape Classe

Namespace Microsoft.VisualBasic.PowerPacks

Outros recursos

Introdução à linha e controles Shape (Visual Studio)

Como: desenhar linhas com o controle de LineShape (Visual Studio)

Como: desenhar formas com os controles de RectangleShape (Visual Studio) e o OvalShape