HEllo
Am new to VB (my version is 2008 express edition), and want to create an app in vb to connect to a web server, read the text file from it, and display the content in a label or textbox. Anyone can guide me on this?
Printable View
HEllo
Am new to VB (my version is 2008 express edition), and want to create an app in vb to connect to a web server, read the text file from it, and display the content in a label or textbox. Anyone can guide me on this?
this is an old vb6 code ........not sure if it helps.........................
Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)
On Error Resume Next
Dim Data As String
Text1.Text = Text1.Text + Replace(Data, Chr(0), "*") & vbCrLf & vbCrLf
End Sub
thanks, found one for vb2008:
Code:Dim versionno As String
Dim objWebClient As New System.Net.WebClient
Dim objUTF8 As New System.Text.UTF8Encoding
versionno = objUTF8.GetString(objWebClient.DownloadData("url/path/to/file.txt"))
objWebClient.Dispose()
txtVersion.Text = versionno