[[Visual Basic]] .txt > afficher son contenu.
goldenmike
Messages postés
366
Statut
Membre
-
williom Messages postés 234 Statut Membre -
williom Messages postés 234 Statut Membre -
Bonjour,
J'aimerais savoir comment afficher le contenu d'un fichier .txt dans une TextBox.
Merci !
--
//Dual - Boot Ubuntu Intrepid Ibex 8.10 / Windobe XP
//Seul un geek sait pourquoi la Peugeot 404 n'existe pas.
J'aimerais savoir comment afficher le contenu d'un fichier .txt dans une TextBox.
Merci !
--
//Dual - Boot Ubuntu Intrepid Ibex 8.10 / Windobe XP
//Seul un geek sait pourquoi la Peugeot 404 n'existe pas.
Configuration: Windows XP Firefox 3.0.10
1 réponse
-
Bonjour,
Dim TextLine as string Open "texte.txt" For Input As #f ' Ouvre le fichier. Do While Not EOF(f) ' Effectue la boucle jusqu'à la fin du fichier. Line Input #f, TextLine 'Met la ligne dans la variable. Textbox.text = Textbox.text & TextLine 'Ajoute la ligne dans le textbox Loop Close #f ' Ferme le fichier. End Sub