Help populating control.location with string value

  • Thread starter Thread starter Marc
  • Start date Start date
M

Marc

I have the below code which works fine. However I need a way for the
test.location line to read the string in form my text file? the line
firm myfilecontents looks like this {X=425,Y=310}.
how can I do this? i.e test.location = myfilecontents

MyFileContents = TextFileStream.ReadLine
Dim test As New Button()
test.Text = MyFileContents
MyFileContents = TextFileStream.ReadLine
test.Location = New Point(1, 2)
Me.Controls.Add(test)
 
Aren't you making your life more complicate than necessary?

Why do you not just serialize using an XML or binary formatter, so that
the deserialize routine will handle that for you?

Marc ha scritto:
 
Back
Top