Departements

Description

C'est un jeu: vous situez le département correctement et vous avez le chef-lieu (c'est un de mes premiers programmes fait avec l'exemple de VB2005 Array)Amusez-vous.
J'ai ajouté le zip en VBA Excel pour les amateurs avec en plus les chefs-lieux.

Source / Exemple :


Public Class Form1
    'Donne le département en fonction du N°
    Private Sub btndept_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btndept.Click
        'Pour empêcher un bug si l'on clique sans faire de saisie
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = (" Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background) 'Mettre le fichier wav dans le dossier 'Debug'
        Else
            On Error Resume Next
            'Methode Array pris dans les exemples de VB 2005, on appelle un nom avec un numéro
            Dim Departement() As String = {"Numéro du Département", "L'Ain", "L'Aisne", "L'Allier", _
                          "Les Alpes-de-Hte-Provence", "Les Hautes-Alpes", "Les Alpes-Maritimes", "L'Ardèche", _
                          "Les Ardennes", "L'Ariège", "L'Aube", "L'Aude", "L'Aveyron", _
                          "Les Bouches-du-Rhône", "Le Calvados", "Le Cantal", "La Charente", _
                          "La Charente-Maritime", "Le Cher", "La Corrèze", "La Corse", "La Côte-d'Or", _
                          "Les Côtes-d'Armor", "La Creuse", "La Dordogne", "Le Doubs", "La Drôme", "L'Eure", "L'Eure-et-Loir", "Le Finistère", "Le Gard", _
                          "La Haute-Garonne", "Le Gers", "La Gironde", "L'Hérault", "L'Ille-et-Vilaine", "L'Indre", "L'Indre-et-Loire", "L'Isère", "Le Jura", _
                          "Les Landes", "Le Loir-et-Cher", "La Loire", "La Haute-Loire", "La Loire-Atlantique", "Le Loiret", "Le Lot", "Le Lot-et-Garonne", "La Lozère", _
                          "Le Maine-et-Loire", "La Manche", "La Marne", "La Haute-Marne", "La Mayenne", "La Meurthe-et-Moselle", "La Meuse", "Le Morbihan", "La Moselle", _
                          "La Nièvre", "Le Nord", "L'Oise", "L'Orne", "Le Pas-de-Calais", "Le Puy-de-Dôme", "Les Pyrénées-Alantiques", "Les Hautes-Pyrénées", "Les Pyrénées-Orientales", _
                          "Le Bas-Rhin", "Le Haut-Rhin", "Le Rhône", "la Haute-Saône", "La Saône-et-Loire", "La Sarthe", "La Savoie", "La Haute-Savoie", "La Seine", _
                          "La Seine-Maritime", "La Seine-et-Marne", "Les Yvelines", "Les Deux-Sèvres", "La Somme", "Le Tarn", "Le Tarn-et-Garonne", "Le Var", "Le Vaucluse", _
                          "La Vendée", "La Vienne", "La Haute-Vienne", "Les Vosges", "L'Yonne", "Le Territoire-de-Belfort", "L'Essonne", "Les Hauts-de-Seine", "La Seine-Saint-Denis", _
                          "Le Val-de-Marne", "Le Val-d'Oise"}
            Dim i As Integer = CInt(TextBox1.Text)
            TextBox2.Text = (Departement(i) & " est le bonne réponse.")
            My.Computer.Audio.Play(Application.StartupPath & "\chimes.wav", AudioPlayMode.Background)
        End If
    End Sub
    'Réinitialiser
    Private Sub btnreset_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnreset.Click
        Dim aNumber As String = ""
        TextBox1.Text = ""
        TextBox2.Text = ""
    End Sub
    'On cherche le département pour avoir le chef-lieu
    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = (" Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
            'Vous attribuez un bouton à un département
        ElseIf TextBox1.Text = "01" Then
            TextBox2.Text = (" Bourg en Bresse est le chef lieu du " & TextBox1.Text)
            'On met une musique associée à la réponse
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            aNumber &= ""
            TextBox2.Text = (" Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "02" Then
            aNumber &= ""
            TextBox2.Text = (" Laon est le chef lieu du " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button4.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = (" Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "03" Then
            TextBox2.Text = (" Moulins est le chef lieu du " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button5_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button5.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "04" Then
            TextBox2.Text = (" Digne les Bains est le chef lieu du " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "05" Then
            TextBox2.Text = (" Gap est le chef lieu du est le chef lieu du " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button7_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button7.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "06" Then
            TextBox2.Text = (" Nice est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button8_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button8.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "07" Then
            TextBox2.Text = (" Privas est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button9_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button9.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "08" Then
            TextBox2.Text = ("Charleville-Mézières est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button10_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button10.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "09" Then
            TextBox2.Text = (" Foix est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button11_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button11.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "10" Then
            TextBox2.Text = (" Troyes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button12_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button12.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "11" Then
            TextBox2.Text = (" Carcassonne est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button13_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button13.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "12" Then
            TextBox2.Text = (" Rodez est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button14_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button14.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "13" Then
            TextBox2.Text = (" Marseille est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button15_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button15.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "14" Then
            TextBox2.Text = (" Caen est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button16_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button16.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "15" Then
            TextBox2.Text = (" Aurillac est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button17_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button17.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "16" Then
            TextBox2.Text = (" Angoulême est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button18_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button18.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "17" Then
            TextBox2.Text = (" La Rochelle est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button19_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button19.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "18" Then
            TextBox2.Text = (" Bourges est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button20_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button20.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "19" Then
            TextBox2.Text = (" Tulle est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button21_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button21.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "20" Then
            TextBox2.Text = (" Ajaccio et Bastia sont les chefs lieux du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button22_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button22.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "21" Then
            TextBox2.Text = (" Dijon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button23_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button23.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "22" Then
            TextBox2.Text = (" St Brieuc est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button24_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button24.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "23" Then
            TextBox2.Text = (" Gueret est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button25_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button25.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "24" Then
            TextBox2.Text = (" Périgueux est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button26_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button26.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "25" Then
            TextBox2.Text = (" Besançon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button27_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button27.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "26" Then
            TextBox2.Text = (" Valence est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button28_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button28.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "27" Then
            TextBox2.Text = (" Evreux est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button29_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button29.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "28" Then
            TextBox2.Text = (" Chartres est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button30_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button30.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "29" Then
            TextBox2.Text = (" Quimper est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button31_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button31.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "30" Then
            TextBox2.Text = (" Nîmes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button32_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button32.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "31" Then
            TextBox2.Text = (" Toulouse est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button33_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button33.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "32" Then
            TextBox2.Text = (" Auch est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button34_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button34.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "33" Then
            TextBox2.Text = (" Bordeaux est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button35_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button35.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "34" Then
            TextBox2.Text = (" Montpellier est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button36_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button36.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "35" Then
            TextBox2.Text = (" Rennes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button37_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button37.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "36" Then
            TextBox2.Text = (" Chateauroux est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button38_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button38.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "37" Then
            TextBox2.Text = (" Tours est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button39_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button39.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "38" Then
            TextBox2.Text = (" Grenoble est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button40_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button40.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "39" Then
            TextBox2.Text = (" Lons-le-Saunier est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button41_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button41.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "40" Then
            TextBox2.Text = (" Mont-de-Marsan est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button42_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button42.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "41" Then
            TextBox2.Text = (" Blois est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button43_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button43.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "42" Then
            TextBox2.Text = (" St Etienne est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button44_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button44.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "43" Then
            TextBox2.Text = (" Le Puy-en-Velay est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button45_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button45.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "44" Then
            TextBox2.Text = (" Nantes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button46_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button46.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "45" Then
            TextBox2.Text = (" Orléans est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button47_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button47.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "46" Then
            TextBox2.Text = (" Cahors est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button48_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button48.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "47" Then
            TextBox2.Text = (" Agen est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If

    End Sub

    Private Sub Button49_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button49.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "48" Then
            TextBox2.Text = (" Mende est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button50_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button50.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "49" Then
            TextBox2.Text = (" Angers est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button51_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button51.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "50" Then
            TextBox2.Text = (" St Lô est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button52_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button52.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "51" Then
            TextBox2.Text = (" Châlons-en Marne est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button53_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button53.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "52" Then
            TextBox2.Text = (" Chaumont est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button54_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button54.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "53" Then
            TextBox2.Text = (" Laval est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button55_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button55.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "54" Then
            TextBox2.Text = (" Nancy est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button56_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button56.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "55" Then
            TextBox2.Text = (" Bar-le-Duc est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button57_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button57.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "56" Then
            TextBox2.Text = (" Vannes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button58_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button58.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "57" Then
            TextBox2.Text = (" Metz est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button59_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button59.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "58" Then
            TextBox2.Text = (" Nevers est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button60_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button60.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "59" Then
            TextBox2.Text = (" Lille est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button61_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button61.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "60" Then
            TextBox2.Text = (" Beauvais est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button62_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button62.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "61" Then
            TextBox2.Text = (" Alençon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button63_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button63.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "62" Then
            TextBox2.Text = (" Arras est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button64_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button64.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "63" Then
            TextBox2.Text = (" Clermont Ferrand est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button65_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button65.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "64" Then
            TextBox2.Text = (" Pau est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button66_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button66.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "65" Then
            TextBox2.Text = (" Tarbes est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button67_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button67.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "66" Then
            TextBox2.Text = (" Perpignan est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button68_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button68.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "67" Then
            TextBox2.Text = (" Strasbourg est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button69_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button69.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "68" Then
            TextBox2.Text = (" Colmar est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button70_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button70.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "69" Then
            TextBox2.Text = (" Lyon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button71_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button71.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "70" Then
            TextBox2.Text = (" Vesoul est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button72_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button72.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "71" Then
            TextBox2.Text = (" Mâcon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button73_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button73.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "72" Then
            TextBox2.Text = (" Le Mans est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button74_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button74.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "73" Then
            TextBox2.Text = (" Chambéry est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button75_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button75.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "74" Then
            TextBox2.Text = (" Annecy est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button76_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button76.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "75" Then
            TextBox2.Text = (" Paris est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button77_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button77.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "76" Then
            TextBox2.Text = (" Rouen est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button78_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button78.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "77" Then
            TextBox2.Text = (" Melun est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button79_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button79.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "78" Then
            TextBox2.Text = (" Versailles est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button80_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button80.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "79" Then
            TextBox2.Text = (" Niort est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button81_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button81.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "80" Then
            TextBox2.Text = (" Amiens est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button82_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button82.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "81" Then
            TextBox2.Text = (" Albi est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button83_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button83.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "82" Then
            TextBox2.Text = (" Montauban est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button84_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button84.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "83" Then
            TextBox2.Text = (" Toulon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button85_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button85.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "84" Then
            TextBox2.Text = (" Avignon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button86_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button86.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "85" Then
            TextBox2.Text = (" La Roche sur Yon est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button87_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button87.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "86" Then
            TextBox2.Text = (" Poitiers est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button88_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button88.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "87" Then
            TextBox2.Text = (" Limoges est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button89_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button89.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "88" Then
            TextBox2.Text = (" Epinal est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button90_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button90.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "89" Then
            TextBox2.Text = (" Auxerre est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button91_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button91.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "90" Then
            TextBox2.Text = (" Belfort est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button92_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button92.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "91" Then
            TextBox2.Text = (" Evry est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button93_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button93.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "92" Then
            TextBox2.Text = (" Nanterre est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button94_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button94.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "93" Then
            TextBox2.Text = (" Bobigny est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button95_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button95.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "94" Then
            TextBox2.Text = (" Créteil est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub

    Private Sub Button96_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button96.Click
        Dim aNumber As String = ""
        If TextBox1.Text = "" Then
            TextBox2.Text = ("Entrez un numéro de département " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        ElseIf TextBox1.Text = "95" Then
            TextBox2.Text = (" Pontoise est le chef lieu du  " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\tada.wav", AudioPlayMode.Background)
        Else : TextBox1.Text = TextBox1.Text
            TextBox2.Text = ("Ce n'est pas la bonne place, essayez de nouveau le " & TextBox1.Text)
            My.Computer.Audio.Play(Application.StartupPath & "\ringin.wav", AudioPlayMode.Background)
        End If
    End Sub
    'On quitte en demandant une réponse
    Private Sub btnquit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnquit.Click
        Dim answer As MsgBoxResult
        answer = MsgBox("Voulez-vous quitter le jeu maintenant?", MsgBoxStyle.YesNo)
        If answer = MsgBoxResult.Yes Then
            MsgBox("Jeu terminé")
            End
        End If
    End Sub
End Class

Conclusion :


Pour les possesseurs de VB2005 je me tiens à leur disposition pour le Zip, car il ne passe pas sur le site il fait 2,6 Mo, donc trop lourd

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.