Support Forums
How can i set Textbox1.text equal to the conents of file.txt? - Printable Version

+- Support Forums (https://www.supportforums.net)
+-- Forum: Categories (https://www.supportforums.net/forumdisplay.php?fid=87)
+--- Forum: Coding Support Forums (https://www.supportforums.net/forumdisplay.php?fid=18)
+---- Forum: Visual Basic and the .NET Framework (https://www.supportforums.net/forumdisplay.php?fid=19)
+---- Thread: How can i set Textbox1.text equal to the conents of file.txt? (/showthread.php?tid=2847)



How can i set Textbox1.text equal to the conents of file.txt? - nevets04 - 11-12-2009

How can i set Textbox1.text equal to the conents of file.txt?


RE: How can i set Textbox1.text equal to the conents of file.txt? - Yoshi - 11-12-2009

Could you please tell us what language this is for?


RE: How can i set Textbox1.text equal to the conents of file.txt? - Smed - 11-13-2009

well depends dude cause where is file.txt going to be and whats in it?


RE: How can i set Textbox1.text equal to the conents of file.txt? - nevets04 - 11-13-2009

(11-12-2009, 11:52 PM)Fail Ninja Wrote: Could you please tell us what language this is for?

Sorry thought it was obvious being in the visual basic section, but yeah, visual basic.


RE: How can i set Textbox1.text equal to the conents of file.txt? - Yoshi - 11-13-2009

Well it could have being VB.Net aswell.


RE: How can i set Textbox1.text equal to the conents of file.txt? - Nonmod - 11-13-2009

Its a vb.net AND other .net language section ;)


RE: How can i set Textbox1.text equal to the conents of file.txt? - TechMan8 - 11-14-2009

Double post -.-

http://www.supportforums.net/showthread.php?tid=2838


RE: How can i set Textbox1.text equal to the conents of file.txt? - Yoshi - 11-14-2009

(11-14-2009, 04:05 PM)TechMan8 Wrote: Double post -.-

http://www.supportforums.net/showthread.php?tid=2838

No, This thread is different, he is asking how to read from a .txt not write to it.


RE: How can i set Textbox1.text equal to the conents of file.txt? - Gaijin - 11-14-2009

7 posts and no one helped him, wow you guys......

I didn't tested this as I don't have need tools for testings.
But I'm sure it's what you are looking for.

Code:
f = FreeFile
path = App.Path & "\file.txt"

Open path For Input As f
    TextBox1.Text = Input(Lof(f), f)
Close f



RE: How can i set Textbox1.text equal to the conents of file.txt? - Cyberknife - 11-17-2009

TextBox1.Text = My.Computer.FileSystem.ReadAllText("filepathname")

This will solvs ur problem..(LOL)