vercomax
Messages postés547Date d'inscriptionmercredi 28 juillet 2004StatutMembreDernière intervention11 septembre 2013
-
6 sept. 2006 à 18:50
PCPT
Messages postés13272Date d'inscriptionlundi 13 décembre 2004StatutMembreDernière intervention 3 février 2018
-
7 sept. 2006 à 16:05
bonjour,
j'ai un code qui redimensionne ma form suivant un click de bouton, mais il ne fonctionne que dans 1 sens. au départ le tag du bouton est à 1
Private Sub bouton1_Click()
If form1.Tag = 1 Then form1.Height 100: form1.Width 100
form1.Tag = 3
Else form1.Height 300: form1.Width 200
form1.Tag = 1
End If
End Sub
cs_casy
Messages postés7741Date d'inscriptionmercredi 1 septembre 2004StatutMembreDernière intervention24 septembre 201440 6 sept. 2006 à 18:58
Private Sub bouton1_Click()
If form1.Tag = " 1" Then form1.Height 100: form1.Width 100
form1.Tag = " 3" Else form1.Height 300: form1.Width 200
form1.Tag = " 1" End If
End Sub
---- Sevyc64 (alias Casy) ----<hr size ="2" width="100%" /># LE PARTAGE EST NOTRE FORCE #
mortalino
Messages postés6786Date d'inscriptionvendredi 16 décembre 2005StatutMembreDernière intervention21 décembre 201118 6 sept. 2006 à 19:01
AAAAAAAAHhhhb j'ai réécris son code :
<small>
Coloration syntaxique automatique </small>
Private Sub bouton1_Click()
With Form1
If .Tag = "1" Then .Height = 100: .Width = 100: .Tag = "3" Else _
.Height = 300: .Width = 200: .Tag = "1"
End With
End Sub
mortalino
Messages postés6786Date d'inscriptionvendredi 16 décembre 2005StatutMembreDernière intervention21 décembre 201118 6 sept. 2006 à 19:01
Re,
c'est normal que ton code ne fonctionne pas, Tag attend un String, toi tu lui envoies un numérique :
<small>
Coloration syntaxique automatique </small>
Private Sub bouton1_Click()
With Form1
If .Tag = 1 Then .Height = 100: .Width = 100: .Tag = 3 Else _
.Height = 300: .Width = 200: .Tag = 1
End With
End Sub