Help populating control.location with string value

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

tommaso.gastaldi

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:
 

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