Redimensionnement automatique du form suivant la taille de l'ecran

cs_chris81 Messages postés 589 Date d'inscription jeudi 2 octobre 2003 Statut Membre Dernière intervention 29 avril 2008 - 5 févr. 2004 à 17:07
riadho2010 Messages postés 6 Date d'inscription mercredi 20 juillet 2011 Statut Membre Dernière intervention 1 juillet 2013 - 1 juil. 2013 à 23:16
comment fait on pour redimensionner un form suivant la taille de l'ecran en vb.net
merci

2 réponses

cs_labout Messages postés 1356 Date d'inscription samedi 8 décembre 2001 Statut Membre Dernière intervention 23 octobre 2006 8
5 févr. 2004 à 18:03
labout

Voici un exemple
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click

' Retrieve the working rectangle from the Screen class
' using the PrimaryScreen and the WorkingArea properties.
Dim workingRectangle As System.Drawing.Rectangle = _
Screen.PrimaryScreen.WorkingArea

' Set the size of the form slightly less than size of
' working rectangle.
Me.Size = New System.Drawing.Size(workingRectangle.Width, _
workingRectangle.Height)

' Set the location so the entire form is visible.
Me.Location = New System.Drawing.Point(0, 0)

End Sub

@+
0