IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Windows Forms Discussion :

problème avec les boutons invisibles


Sujet :

Windows Forms

  1. #1
    Membre du Club
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Points : 40
    Points
    40
    Par défaut problème avec les boutons invisibles
    Salut à tous.
    Je suis débutante en vb.net et entrain de faire un jeu avec vb.net 2005.
    J'ai une étape qui consiste à afficher la carte mondiale et un nom du pays du monde entier aléatoirement et donc l'utilisateur n'a qu'à cliquer sur la bonne localisation.
    Les pays du monde sont stockés dans un tableau. Donc j'ai fait des boutons invisibles sur chaque pays du monde mais à l'exécution ça marche pas c'ad qu'en cliquant rien ne se passe. Voici mon code :

    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
    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
    Merci de m'aider.

  2. #2
    Expert éminent sénior Avatar de Pol63
    Homme Profil pro
    .NET / SQL SERVER
    Inscrit en
    Avril 2007
    Messages
    14 154
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : .NET / SQL SERVER

    Informations forums :
    Inscription : Avril 2007
    Messages : 14 154
    Points : 25 072
    Points
    25 072
    Par défaut
    un bouton invisible n'est pas clickable
    donc réfléchis à une autre méthode ...


    de plus les tableaux c'est plus à la mode, de nos jours on utilise des collections
    Cours complets, tutos et autres FAQ ici : C# - VB.NET

  3. #3
    Membre averti
    Avatar de Ogotcha
    Inscrit en
    Juillet 2008
    Messages
    232
    Détails du profil
    Informations personnelles :
    Âge : 38

    Informations forums :
    Inscription : Juillet 2008
    Messages : 232
    Points : 398
    Points
    398
    Par défaut
    de plus les tableaux c'est plus à la mode, de nos jours on utilise des collections
    +1

    Concernant ton problème, que souhaites-tu faire car je vois pas non plus pourquoi tu veux utiliser des boutons sans vouloir les afficher, il existe bien d'autre contrôle qui je pense seront bien adaptés
    Mon Blog
    FAQs DotNet
    Fonction utile : Recherche

  4. #4
    Expert éminent sénior Avatar de Pol63
    Homme Profil pro
    .NET / SQL SERVER
    Inscrit en
    Avril 2007
    Messages
    14 154
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : .NET / SQL SERVER

    Informations forums :
    Inscription : Avril 2007
    Messages : 14 154
    Points : 25 072
    Points
    25 072
    Par défaut
    elle doit avoir une carte sur un picturebox et elle veut rendre des zones clicables

    une des solutions c'est de gérer le mousedown sur le picturebox et de voir à quel bouton ca correspond grace aux coordonnées puis d'appeler la sub click du bouton
    Cours complets, tutos et autres FAQ ici : C# - VB.NET

  5. #5
    Membre du Club
    Inscrit en
    Novembre 2009
    Messages
    82
    Détails du profil
    Informations forums :
    Inscription : Novembre 2009
    Messages : 82
    Points : 40
    Points
    40
    Par défaut
    j'ai pensé a localiser chaque pays et utiser picturebox.location
    bon je vais essayer et merci pour votre aide

  6. #6
    Expert éminent sénior Avatar de Pol63
    Homme Profil pro
    .NET / SQL SERVER
    Inscrit en
    Avril 2007
    Messages
    14 154
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Âge : 42
    Localisation : France, Puy de Dôme (Auvergne)

    Informations professionnelles :
    Activité : .NET / SQL SERVER

    Informations forums :
    Inscription : Avril 2007
    Messages : 14 154
    Points : 25 072
    Points
    25 072
    Par défaut
    sinon il existe system.drawing.region (ou path je sais plus)
    et y a .contains(point) dessus
    Cours complets, tutos et autres FAQ ici : C# - VB.NET

Discussions similaires

  1. Réponses: 7
    Dernier message: 10/10/2007, 14h15
  2. [Traitement d'image] problème avec les boutons animés
    Par robmoto dans le forum Webdesign & Ergonomie
    Réponses: 9
    Dernier message: 17/08/2007, 13h36
  3. Problème avec les Boutons Image
    Par abdoing dans le forum Struts 1
    Réponses: 4
    Dernier message: 29/06/2007, 10h35
  4. Problème avec les boutons d'options
    Par Le Rebel dans le forum Langage
    Réponses: 3
    Dernier message: 07/02/2006, 12h12
  5. Problème avec les boutons de perl Tk
    Par jkevin2 dans le forum Interfaces Graphiques
    Réponses: 4
    Dernier message: 02/09/2005, 17h18

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo