|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Help populating control.location with string valueI 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: Show quoteHide quote > 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)
regarding .net help
Help reading control.location value back form text file Registry Key Manipulation simple format question Getting IP Address of the ACTIVE network card DataGridView conversion problems Help reading simple text file newbie: foundfile attributes? (filesize, saved date, etc.) Beginners needs some help in Writing to text file help readin text file |
|||||||||||||||||||||||