Bonjour,
Dans l'objectif d'adapter la taille de l'application aux choix de l'utilisateur, j'ai créé des boutons radios pour diverses dimensions
Lors du clic sur le bouton "appliquer" , la taille de la fenêtre change mais celle de la TabPage (tp_propos en gris ) reste la même
J'ai essayé de changer les propriétés Width, Height ou Size mais rien ne change...
Si vous avez une idée je suis preneur ! Merci d'avance !
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 Private Sub Button40_Click(sender As System.Object, e As System.EventArgs) Handles Button40.Click '1333; 893 '1343; 950 If (RadioButton2.Checked And My.Computer.Screen.WorkingArea.Width >= 1920 And My.Computer.Screen.WorkingArea.Height >= 1080) Then Me.Width = 1920 'tp_propos.Width = 1920 - 10 Me.Height = 1080 ' tp_propos.Height = 1080 - 57 End If If (RadioButton3.Checked And My.Computer.Screen.WorkingArea.Width >= 1366 And My.Computer.Screen.WorkingArea.Height >= 768) Then Me.Width = 1366 ' tp_propos.Width = 1366 - 10 Me.Height = 768 ' tp_propos.Height = 768 - 57 End If If (RadioButton4.Checked And My.Computer.Screen.WorkingArea.Width >= 1280 And My.Computer.Screen.WorkingArea.Height >= 1024) Then Me.Width = 1280 ' tp_propos.Width = 1280 - 10 Me.Height = 1024 tp_propos.Size = New Size(90, 50) End If If (RadioButton1.Checked And My.Computer.Screen.WorkingArea.Width >= 1024 And My.Computer.Screen.WorkingArea.Height >= 768) Then Me.Width = 1024 ' tp_propos.Width = 1024 - 10 Me.Height = 768 'tp_propos.Height = 768 - 57 'tp_propos.SizeMode End If End Sub
Partager