Results 1 to 2 of 2

Thread: Saving

  1. #1
    Guest

    Post

    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

  2. #2
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,177

    Post

    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.
    Code:
    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
    [email protected]
    [email protected]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width