Nota
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare ad accedere o modificare le directory.
L'accesso a questa pagina richiede l'autorizzazione. È possibile provare a modificare le directory.
Si verifica quando la forma viene spostata.
Spazio dei nomi: Microsoft.VisualBasic.PowerPacks
Assembly: Microsoft.VisualBasic.PowerPacks.Vs (in Microsoft.VisualBasic.PowerPacks.Vs.dll)
Sintassi
'Dichiarazione
<BrowsableAttribute(True)> _
Public Event Move As EventHandler
[BrowsableAttribute(true)]
public event EventHandler Move
[BrowsableAttribute(true)]
public:
event EventHandler^ Move {
void add (EventHandler^ value);
void remove (EventHandler^ value);
}
[<BrowsableAttribute(true)>]
member Move : IEvent<EventHandler,
EventArgs>
JScript non supporta gli eventi.
Note
Move l'evento si verifica solo quando cambia la posizione di una forma relativamente al relativo contenitore, non quando il contenitore viene spostato.
per ulteriori informazioni su come gestire gli eventi, vedere Utilizzo degli eventi.
Esempi
Nell'esempio seguente viene illustrato come rispondere a Move evento in un gestore eventi.Questo esempio presuppone che l'utente abbia OvalShape controllare OvalShape1 denominato e un oggetto RectangleShape controllare RectangleShape1 denominato in un form.
Private Sub OvalShape1_Move() Handles OvalShape1.Move
Dim rect As New Rectangle
' Get the bounding rectangle for the rectangle shape.
rect = RectangleShape1.DisplayRectangle
' Determine whether the bounding rectangles overlap.
If rect.IntersectsWith(OvalShape1.DisplayRectangle) Then
' Bring the oval shape to the front.
OvalShape1.BringToFront()
End If
End Sub
private void ovalShape1_Move(object sender, System.EventArgs e)
{
Rectangle rect = new Rectangle();
// Get the bounding rectangle for the rectangle shape.
rect = rectangleShape1.DisplayRectangle;
// Determine whether the bounding rectangles overlap.
if (rect.IntersectsWith(ovalShape1.DisplayRectangle))
// Bring the oval shape to the front.
{
ovalShape1.BringToFront();
}
}
Sicurezza di .NET Framework
- Attendibilità totale per il chiamante immediato. Impossibile utilizzare questo membro in codice parzialmente attendibile. Per ulteriori informazioni, vedere Utilizzo di librerie da codice parzialmente attendibile.
Vedere anche
Riferimenti
Spazio dei nomi Microsoft.VisualBasic.PowerPacks
Altre risorse
Procedura: disegnare linee con il controllo LineShape (Visual Studio)
Procedura: disegnare forme con i controlli OvalShape e RectangleShape (Visual Studio)