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 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202
|
Public Class Form1
Dim Ant, Bar As Boolean
' Boucle indique le nombre de sauts de déplacement des Labels
Dim Abs, Ord, Incrément As Integer
' Phase indique la phase de chaque déplacement de Label
Dim Phase As String
Public Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
'Initialisation de Ant et Bar au chargement de la fenêtre Form1
Ant = False
Bar = False
Incrément = 1
' Phase = "AD1"
End Sub
Public Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
' Bouton "Quitter"
'Label23.Location = New Point(110, 160)
Close()
End Sub
Public Sub Button2_MouseDown() Handles Button2.MouseDown
' Bouton "?" actionné, il efface le Logo et fait apparaître le texte de Label1
PictureBox1.Visible = False
Label1.Visible = True
End Sub
Public Sub Button2_MouseUp() Handles Button2.MouseUp
' Bouton "?" relâché, il efface le texte de Label1 et fait apparaître le Logo
Label1.Visible = False
PictureBox1.Visible = True
End Sub
Public Sub Timer1_Tick() Handles Timer1.Tick
Abs = Abs + Incrément
End Sub
Public Sub Timer2_Tick() Handles Timer2.Tick
Ord = Ord - Incrément
End Sub
Public Sub Button7_Click(sender As System.Object, e As System.EventArgs) Handles Button7.Click
' Bouton Antoine
Ant = True
Bar = False
' Activation Couleurs Antoine
Label4.BackColor = Color.Orange
Label5.BackColor = Color.Gold
Label6.BackColor = Color.Gold
Label7.BackColor = Color.Gold
Label8.BackColor = Color.Gold
' Désactivation Couleurs Barbara
Label9.BackColor = Color.DarkGray
Label10.BackColor = Color.LightGray
Label11.BackColor = Color.LightGray
Label12.BackColor = Color.LightGray
Label13.BackColor = Color.LightGray
' Activation Couleurs Public
Label14.BackColor = Color.DarkTurquoise
Label15.BackColor = Color.PaleTurquoise
Label16.BackColor = Color.PaleTurquoise
Label17.BackColor = Color.PaleTurquoise
Label18.BackColor = Color.PaleTurquoise
End Sub
Public Sub Button6_Click(sender As System.Object, e As System.EventArgs) Handles Button6.Click
' Bouton Barbara
Bar = True
Ant = False
' Désactivation Couleurs Antoine
Label4.BackColor = Color.DarkGray
Label5.BackColor = Color.LightGray
Label6.BackColor = Color.LightGray
Label7.BackColor = Color.LightGray
Label8.BackColor = Color.LightGray
' Activation Couleurs Barbara
Label9.BackColor = Color.Magenta
Label10.BackColor = Color.Violet
Label11.BackColor = Color.Violet
Label12.BackColor = Color.Violet
Label13.BackColor = Color.Violet
' Activation Couleurs Public
Label14.BackColor = Color.DarkTurquoise
Label15.BackColor = Color.PaleTurquoise
Label16.BackColor = Color.PaleTurquoise
Label17.BackColor = Color.PaleTurquoise
Label18.BackColor = Color.PaleTurquoise
End Sub
Public Sub Button3_Click(sender As System.Object, e As System.EventArgs) Handles Button3.Click
' Bouton RAZ
Ant = False
Bar = False
' Désactivation Couleurs Antoine
Label4.BackColor = Color.DarkGray
Label5.BackColor = Color.LightGray
Label6.BackColor = Color.LightGray
Label7.BackColor = Color.LightGray
Label8.BackColor = Color.LightGray
' Désactivation Couleurs Barbara
Label9.BackColor = Color.DarkGray
Label10.BackColor = Color.LightGray
Label11.BackColor = Color.LightGray
Label12.BackColor = Color.LightGray
Label13.BackColor = Color.LightGray
' Désactivation Couleurs Public
Label14.BackColor = Color.DarkGray
Label15.BackColor = Color.LightGray
Label16.BackColor = Color.LightGray
Label17.BackColor = Color.LightGray
Label18.BackColor = Color.LightGray
' RAZ Label23, 24, 25 et 26
Label23.Location = New Point(110, 160)
Label23.Visible = False
Label24.Location = New Point(110, 190)
Label24.Visible = False
Label25.Location = New Point(110, 220)
Label25.Visible = False
Label26.Location = New Point(110, 250)
Label26.Visible = False
' RAZ Bibliothèques
Label19.BackColor = Color.DarkGray
Label20.BackColor = Color.DarkGray
Label21.BackColor = Color.DarkGray
Label22.BackColor = Color.DarkGray
End Sub
Public Sub Button5_Click(sender As System.Object, e As System.EventArgs) Handles Button5.Click
' Affichage Bibliothèques
Label19.BackColor = Color.DarkOrange
Label20.BackColor = Color.DarkOrange
Label21.BackColor = Color.DarkOrange
Label22.BackColor = Color.DarkOrange
' Si Antoine est sélectionné
If Ant = True Then
' Timer1.Enabled = True
' Phase = "AD1"
Label23.Visible = True
Abs = 110
Do While Abs < 401
Label23.Location = New Point(Abs, 160)
' Timer1_Tick()
Abs = Abs + Incrément
Loop
MessageBox.Show(Abs)
' Phase = "AI1"
Label24.Visible = True
Abs = 110
Do While Abs < 601
Label24.Location = New Point(Abs, 190)
Abs = Abs + Incrément
Loop
MessageBox.Show(Abs)
' Phase = "AI2"
Ord = 190
Do While Ord > 160
Label24.Location = New Point(600, Ord)
Ord = Ord - Incrément
Loop
MessageBox.Show(Ord)
' Phase = "AM1"
Label25.Visible = True
Abs = 110
Do While Abs < 781
Label25.Location = New Point(Abs, 220)
Abs = Abs + Incrément
Loop
MessageBox.Show(Abs)
' Phase = "AM2"
Ord = 220
Do While Ord > 160
Label25.Location = New Point(780, Ord)
Ord = Ord - Incrément
Loop
MessageBox.Show(Ord)
' Phase = "AV1"
Label26.Visible = True
Abs = 110
Do While Abs < 961
Label26.Location = New Point(Abs, 250)
Abs = Abs + Incrément
Loop
MessageBox.Show(Abs)
' Phase = "AV2"
Timer2.Enabled = True
Timer2.Interval = 1000
Ord = 250
Do While Ord > 160
Label26.Location = New Point(960, Ord)
'Ord = Ord - Incrément
Timer2_Tick()
Loop
Timer2.Enabled = False
MessageBox.Show(Ord)
End If
End Sub
End Class |
Partager