I need to read data from text files and use the same in my application. Im using VB 6.0. What commands do I use? Some Sample code would be highly appreciated.
i will refer you a different method to read and import the content to your form window
public sub readfile
Dim rtc As TextBox = New TextBox
rtc.Multiline = True
rtc.ScrollBars = ScrollBars.Both
rtc.Width = 400
rtc.Height = 200
Me.Controls.Add(rtc)
rtc.WordWrap = True
Dim FILE_NAME As String = "C:\Users\vcidex92\Desktop\suji\me.html"
If System.IO.File.Exists(FILE_NAME) = True Then
Dim objReader As New System.IO.StreamReader(FILE_NAME)
rtc.Text = objReader.ReadToEnd
objReader.Close()
Else
MsgBox("File Does Not Exist")
End If
end sub