Jump to content
nelson_t

Ler linha num fichero txt e alterar numa texbox

Recommended Posts

nelson_t

Como posso utilizar o readlines para ler um lina num ficheiro txt?

e para alterar numa textbox?

obrigado

Edited by nelson_t

Share this post


Link to post
Share on other sites
nelson_t

Tentei assim mas nao funcionou.

não dá erro nenhum,

//  Dim FILE_NAME As String = "d:\test.txt"
    Dim objReader As New System.IO.StreamReader(FILE_NAME)
    If System.IO.File.Exists(FILE_NAME) = True Then


	    TextBox1.Text = objReader.ReadToEnd
	    objReader.Close()

    Else

	    MsgBox("File Does Not Exist")

    End If

   End Sub   

Share this post


Link to post
Share on other sites
nelson_t

com este codigo ele so esta a mostar a lina do ficheiro de txt na textbox.

queria poder escrever na textbox e alterar no ficheiro txt

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.