| View previous topic :: View next topic |
| Author |
Message |
cogbuehi
Joined: 25 Mar 2008 Posts: 2
|
Posted: Tue Apr 01, 2008 2:29 pm Post subject: Read/Write Data |
|
|
| I need help creating a program that accepts up to 500 characters of text and then writes it to a disk data file. There should be a popup that tells the user the data was written to the file successfully. Once the data is written, i need a button that reads the data file and displays the text in a second textbox. |
|
| Back to top |
|
 |
|
|
egendapoco
Joined: 06 May 2008 Posts: 1
|
Posted: Tue May 06, 2008 2:48 am Post subject: Re: Read/Write Data |
|
|
Private Sub form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
richtextbox1.maxlength = (500)
End Sub
Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.click
Dim path As String = "text.txt"
RichTextBox1.SaveFile(path)
End Sub
Private Sub button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button2.click
Dim path As String = "text.txt"
RichTextBox2.LoadFile(path)
MessageBox.Show("The file was sucessfully saved", "Sucessful", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub |
|
| Back to top |
|
 |
|
Welcome to DEVPPL.com
You are not logged in, which means that you can't post in the forums. Click here to Register
If you are a current member here on DEVPPL, please login below:
|
|
|
|