One way I would do this, instead of using a 1 or a 0 is to write two
small global methods like this (I believe I read this in a book, I
can't which one):
Function Bool2Str(s As String) As Boolean
Dim v As Variant
v = s
Return v
End Function
Function Str2Bool(b As Boolean) As String
Dim v As Variant
v = b
Return v
End Function
Then when you want to write to your preferences file, you just use
something like this:
myStream.Write Bool2Str(myCheckbox.value)
And when reading from the prefs file, you'd use this:
myCheckbox.Value = Str2Bool(myStream.ReadLine)
-Richard
On Oct 29, 2004, at 4:56 AM, GAmoore at aol dot com wrote:
well what you must do is save the checkbox state to a preferences file
of sorts
then when your application opens again, it loads the info it saved and
sets the last state
it was at
To fill in some details .... create and write a file, put 1 for on, 0
for off
when closing the app. then when opening, look to see if the file
exists, read
it, and if 1 make the checkbox true, 0 make it false. You use
readlines and
writelines.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|