Results 1 to 2 of 2

Thread: making a text editor[resolved]

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Sep 2005
    Posts
    1,547

    Resolved 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.

  2. #2
    Member
    Join Date
    Sep 2005
    Posts
    54

    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
  •  



Click Here to Expand Forum to Full Width