neodammer Posted August 2, 2005 Posted August 2, 2005 I havent done vb.net in awhile been doing php but anyways now im back for more ! :p anyway im trying to take the first lets say 15 letters per line of a .txt file and display each in a text box. Its a part of a larger program im developing. Thanks any suggestions as to what syntax i should be reviewing/learning? lol Quote Enzin Research and Development
Joe Mamma Posted August 2, 2005 Posted August 2, 2005 lots of examples under StreamReader Quote Joe Mamma Amendment 4: The right of the people to be secure in their persons, houses, papers, and effects, against unreasonable searches and seizures, shall not be violated, and no warrants shall issue, but upon probable cause, supported by oath or affirmation, and particularly describing the place to be searched, and the persons or things to be seized. Amendment 9: The enumeration in the Constitution, of certain rights, shall not be construed to deny or disparage others retained by the people.
neodammer Posted August 3, 2005 Author Posted August 3, 2005 (edited) Dim sr As StreamReader = New StreamReader("C:\me.txt") Dim line As String Do Until line = Nothing line = sr.ReadLine() TextBox1.Text = TextBox1.Text & vbCrLf & line Loop textbox shows nothing. It is set to multiline etc..any suggestions? ***update*** nevermind figured it out 2min's after posting :rolleyes: Dim sr As StreamReader = New StreamReader("C:\me.txt") Dim line As String Do line = sr.ReadLine() TextBox1.Text = TextBox1.Text & vbCrLf & line Loop Until line = Nothing sr.Close() Now my problem comes with getting a file that open to be read only cause i only want to read it and in this particular program the file will be in use by another program and it gives me an error stating its in use. I just need to read it and update the textbox in the program. Nevermind I got it..geeze lol i need to think deeply before posting @_@ Edited August 3, 2005 by neodammer Quote Enzin Research and Development
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.