View Single Post
Old Dec 10th, 2006, 12:36 AM   #2
alphonso
Programmer
 
Join Date: Dec 2005
Location: Philippines, where the seasons are: hot, and hotter
Posts: 72
Rep Power: 3 alphonso is on a distinguished road
If you mean storing a number to the hard drive, then there's two ways I can think of:
1) Create a database to store your integer to memory, and the second one is a bit hard...
2) Create a Registry Key to store your integer.

I'd recomment number 1 because it's safer to do (flooding the Registry is a computer crime ). To do this, build a connection with a Database, be it Jet4.0 or SQL.

If you mean getting a number from memory, then you either have to do one of the above (just reverse the codes to retrieve it, rather than save it), but another option is available:

Create a text file (using Notepad if you want), an put in a number there. Afterwhich, you can call the ReadLine() and WriteLine() functions built in VB2005 (browse the Object Browser by pressing F2 for more info about these functions).
By the way, there's really no reason at all to post two posts...We all see your first one
__________________
"The most incomprehensible idea about the universe is that it is comprehensible" - Albert Einstein

Last edited by alphonso; Dec 10th, 2006 at 12:47 AM.
alphonso is offline   Reply With Quote