Help reading simple text file

M

Marc

HI,

I have this simple code below that writes my forms buttons name and
location to a text file.

What I am really struggling with is the code to read the information
back in form the text file and create and position a new button based
on the information.

Any Ideas?

Dim TW As System.IO.TextWriter
TW = System.IO.File.CreateText("C:\MyTextFile.txt")
Dim C As Control
For Each C In Me.Controls
If TypeOf C Is Button Then
TW.WriteLine(C.Text)
TW.WriteLine(C.Location)
End If
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top