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 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617
| Public Class Etape3_jeu
Dim a, myprogress, i As Single
Public score As Single
Dim ComptBonneReponse As Single = 0
Dim N As Single = 51
Dim Pays(N) As String
Dim passer As Boolean = True
Dim b As Boolean = False
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Pays(0) = "Angola"
Pays(1) = "Zambie"
Pays(2) = "Afrique du Sud"
Pays(3) = "Chili"
Pays(4) = "Argentine"
Pays(5) = "venezuela"
Pays(6) = "Brésil"
Pays(7) = "Uruguay"
Pays(8) = "Madagascar"
Pays(9) = "Australie"
Pays(10) = "NouvelleZelande"
Pays(11) = "Cuba"
Pays(12) = "Grèce"
Pays(13) = "Maroc"
Pays(14) = "Oman"
Pays(15) = "Etats-Unis d'Amérique"
Pays(16) = "Chine"
Pays(17) = "Arabie saoudite"
Pays(18) = "Mauritanie"
Pays(19) = "Royaume Uni"
Pays(20) = "Canada"
Pays(21) = "Mexique"
Pays(22) = "Japon"
Pays(23) = "Chine"
Pays(24) = "Russie"
Pays(25) = "Finlande"
Pays(26) = "Suede"
Pays(27) = "Norvege"
Pays(28) = "Somalie"
Pays(29) = "Ukraine"
Pays(30) = "Islande"
Pays(31) = "France"
Pays(32) = "Irlande"
Pays(33) = "Portugal"
Pays(34) = "Iraq"
Pays(35) = "Iran"
Pays(36) = "Pakistan"
Pays(37) = "Inde"
Pays(38) = "Philippines"
Pays(39) = "Indonésie"
Pays(40) = "Libye"
Pays(41) = "Tunisie"
Pays(42) = "Algérie"
Pays(43) = "Mali"
Pays(44) = "Egypte"
Pays(45) = "Tchad"
Pays(46) = "Niger"
Pays(47) = "Nigeria"
Pays(48) = "Turquie"
Pays(49) = "Italie"
Pays(50) = "Espagne"
Pays(51) = "Pologne"
charger()
End Sub
Private Sub charger()
While (myprogress < 60) And (passer = True)
passer = False
Randomize()
a = -1
While (a < 0) Or (a > Pays.Length() - 1)
a = CInt(Rnd() * Pays.Length() - 1) + 1
End While
Lbl1.Text = Pays(a)
Lbl1.Visible = True
End While
End Sub
Private Sub NouvelleZelande_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NouvelleZelande.Click
If NouvelleZelande.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Australie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Australie.Click
If Australie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Madagascar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Madagascar.Click
If Madagascar.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Uruguay_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Uruguay.Click
If Uruguay.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Bresil_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Bresil.Click
If Bresil.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Venezuela_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Venezuela.Click
If Venezuela.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Argentine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Argentine.Click
If Argentine.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Chili_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Chili.Click
If Chili.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub afrique_du_sud_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles afrique_du_sud.Click
If afrique_du_sud.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Zambie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Zambie.Click
If Zambie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Angola_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Angola.Click
If Angola.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Nigeria_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Nigeria.Click
If Nigeria.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Niger_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Niger.Click
If Niger.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Tchad_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tchad.Click
If Tchad.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Egypte_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Egypte.Click
If Egypte.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Mali_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mali.Click
If Mali.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Mauritanie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mauritanie.Click
If Mauritanie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Algerie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Algerie.Click
If Algerie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Tunisie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Tunisie.Click
If Tunisie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Libye_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Libye.Click
If Libye.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Indonésie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Indonésie.Click
If Indonésie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Philippines_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Philippines.Click
If Philippines.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Inde_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Inde.Click
If Inde.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub pakistan_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pakistan.Click
If pakistan.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Iran_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Iran.Click
If Iran.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Arabie_saoudite_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Arabie_saoudite.Click
If Arabie_saoudite.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Iraq_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Iraq.Click
If Iraq.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Turquie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Turquie.Click
If Turquie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Italie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Italie.Click
If Italie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Espagne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Espagne.Click
If Espagne.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Portugal_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Portugal.Click
If Portugal.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub France_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles France.Click
If France.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Irlande_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Irlande.Click
If Irlande.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub RoyaumeUni_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles RoyaumeUni.Click
If RoyaumeUni.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Islande_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Islande.Click
If Islande.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Ukraine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Ukraine.Click
If Ukraine.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Norvege_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Norvege.Click
If Norvege.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Suede_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Suede.Click
If Suede.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Finlande_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Finlande.Click
If Finlande.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Russie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Russie.Click
If Russie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Chine_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Chine.Click
If Chine.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Japon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Japon.Click
If Japon.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Mexique_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Mexique.Click
If Mexique.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub EtatUni_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles EtatUni.Click
If EtatUni.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Canada_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Canada.Click
If Canada.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Cuba_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cuba.Click
If Cuba.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Pologne_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Pologne.Click
If Pologne.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Grece_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Grece.Click
If Grece.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Maroc_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Maroc.Click
If Maroc.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Oman_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
If Oman.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Somalie_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
If Somalie.Text = Lbl1.Text Then
score += 100
ComptBonneReponse += 1
Else
Lbl2.Text = "Erreur"
End If
charger()
End Sub
Private Sub Timer2_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer2.Tick
i += 1
If i = 3 Then
Timer2.Stop()
Accueil.Show()
Me.Hide()
End If
End Sub
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
PB.Value = myprogress
If myprogress < 60 Then
myprogress = myprogress + 1
Lbl4.Text = CInt(myprogress * 100 / 60) & "%"
ElseIf myprogress = 60 Then
Lbl4.Text = "Complete"
PB.Visible = False
Lbl5.Visible = True
B = True
End If
If b = True Then
Timer1.Stop()
Timer2.Start()
End If
End Sub
End Class |
Partager