Teen Programmers Unite  
 

 

Return to forum top

Ooops, sorry. How do I load & Save with VB?

Posted by AndiProg [send private reply] at September 22, 2002, 09:00:36 PM

Sorry about the rules stuff. Anyway, I'm having trouble with saving and loading files (Not files, really. I mean like the value of a progress Bar) for my program. I'm using Visual Basic. And the program is for Windows 95 and above.

Posted by CodeRed [send private reply] at September 22, 2002, 10:18:59 PM

Check out the thread titled "File Reading VB6"

Posted by 142857 [send private reply] at September 23, 2002, 03:25:27 PM

there is no high-level, easy way. to save, you just write to a file in a specified format (now, just the value of the bar, but later, maybe more), and to load, you just read the specified format from the file

Posted by Nyiah [send private reply] at September 23, 2002, 05:29:46 PM

uhm, you know you could put all these posts on the same thread instead of making a new one everytime...

Posted by regretfuldaydreamer [send private reply] at September 23, 2002, 05:51:16 PM

Psion rocks

Posted by Psion [send private reply] at September 23, 2002, 05:57:01 PM

rdd, that is a completely useless post and pointlessly nasty post. I don't know why you made it.

Posted by regretfuldaydreamer [send private reply] at September 23, 2002, 05:59:59 PM

Sorry

/me accepts whatever punishment is deemed necessary.

Posted by buzgub [send private reply] at September 23, 2002, 09:52:29 PM

For the value of a progressbar, it's just a variable. This applies to all properties. You can access the variable by saying the name of the control, then a dot, then the property you wish to twiddle (or read).

For instance, if you have a text box named "username", you could get the text in there and pop up a message box with that by saying something like:

MsgBox "Hello, " + username.text


or set it with something like:
username.text = "nameless one"


I'll leave changing that to the value of a progressbar as an exercise for the reader.

There are a few shortcuts, but I think they make code harder to read so I won't mention them.
You must be logged in to post messages and see which you have already read.

Log on
Username:
Password:
Save for later automatic logon

Register as a new user
 
Copyright TPU 2002. See the Credits and About TPU for more information.