|
Cet article a fait l'objet d'une traduction automatique. Déplacez votre pointeur sur les phrases de l'article pour voir la version originale de ce texte. Informations supplémentaires.
|
Traduction
Source
|
Form.SetDesktopBounds, méthode
Espace de noms : System.Windows.Forms
Assembly : System.Windows.Forms (dans System.Windows.Forms.dll)
Paramètres
- x
- Type : System.Int32
Coordonnée x du formulaire.
- y
- Type : System.Int32
Coordonnée y de l'emplacement du formulaire.
- width
- Type : System.Int32
la largeur du formulaire.
- height
- Type : System.Int32
la hauteur du formulaire.
private void Button2_Click(System.Object sender, System.EventArgs e) { for(int i = 0; i <= 20; i++) { // With each loop through the code, the form's // desktop location is adjusted right and down // by 10 pixels and its height and width are each // decreased by 10 pixels. this.SetDesktopBounds(this.Location.X+10, this.Location.Y+10, this.Width-10, this.Height-10); // Call Sleep to show the form gradually shrinking. System.Threading.Thread.Sleep(50); } }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (rôle principal du serveur non pris en charge), Windows Server 2008 R2 (rôle principal du serveur pris en charge avec SP1 ou version ultérieure ; Itanium non pris en charge)
Le .NET Framework ne prend pas en charge toutes les versions de chaque plateforme. Pour obtenir la liste des versions prises en charge, consultez Configuration requise du .NET Framework.