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