|
-
Oct 10th, 2005, 08:52 AM
#1
Thread Starter
Frenzied Member
making a text editor[resolved]
how would i make it so i have a button that opens up "C:\text.txt" and displays it in a textbox then when u hit another button it saves it??
Last edited by high6; Oct 10th, 2005 at 08:59 AM.
-
Oct 10th, 2005, 08:56 AM
#2
Member
Re: making a text editor???
To open file...
Dim sr As New Streamreader("c:\text.txt")
textbox1.Text = sr.ReadToEnd()
sr.Close()
To save text...
Dim sw As New Streamwriter("c:\text.txt")
sw.Write(textbox1.Text)
sw.Close()
Think that should do it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|