vb6 - save a label's property to a file for reading and writing in visual studio 2010 -


i making project in visual studio 2010. creating windows application in wanted save label's property file , clicking button on form, read file , restore label's property. able in vb6 cannot in visual studio 2010 languages little different. wrote in vb6:

this code saving label

    open "time table" output #1     write #1, label4     close 1 

code loading label

    open "time table" input #1     input #1, label4     close 1 

so question should in visual studio 2010 make code work.

any appreciated regards, smkh

unless i'm misreading question want read , write file in vb.net.

if there plenty of examples on web, try this one start, here, , here. stripped down minimum code should this:

'write using outfile new streamwriter("time table")     outfile.write(label4.text) end using  'read using sr new streamreader("time table")     label4.text = sr.readtoend() end using  

addendum: there's excellent example of serialization here.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -