PDA

Click to See Complete Forum and Search --> : Saving


Dec 14th, 1999, 02:33 AM
Is there any way of saving a program in its current state so next time you run the program it is exactly as you left it, with variables having the same values, text as it wwas left etc

Aaron Young
Dec 14th, 1999, 03:06 AM
You can use te Registry or an INI file to store your Variables/Settings when you close your Program, then Load them back in when your Program startsup, eg.

Private Sub Form_Load()
Text1 = GetSetting(App.Title, "Settings", "Text1", "")
End Sub

Private Sub Form_Unload(Cancel As Integer)
Call SaveSetting(App.Title, "Settings", "Text1", Text1)
End Sub

Run this Example, Enter some Text, Close the Form.. Rerun the Example and the text you Entered should be placed in the Textbox when the Form Loads.

------------------
Aaron Young
Analyst Programmer
aarony@redwingsoftware.com
adyoung@win.bright.net