Bonjour,
Aujourd'hui, je recherche comment lire le contenu d'un fichier texte hébergé
Exemple :
http://www.developpez.com/fichier.txt
J'aimerais lire fichier.txt
PS : Ceci dans une richtextbox
EDIT : Je post l'exemple pour ceux qui seraient intéressés :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 Dim withevents Wclient As New WebClient Private sub lecturefichier() Richtextbox1.text = Wclient.downloadstring("http://localhost/fichier.txt") End sub Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load lecturefichier() End Sub
Partager