Results 1 to 4 of 4

Thread: [RESOLVED] SaveSetting

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2007
    Location
     
    Posts
    453

    Resolved [RESOLVED] SaveSetting

    I know this is a broad question, but how is the save settign feature used? Would it be possible to like save whether a checkbox was checked for a later runtime?
    Haikus are easy.
    But sometimes they don't make sense.
    Refrigerator.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: SaveSetting

    It saves some value to a registry and getsetting retrieves it back.
    Here is how it works:
    Code:
    Private Sub Check1_Click()
        SaveSetting App.EXEName, "Config", "Check1", Check1.Value
    End Sub
    
    Private Sub Form_Load()
        Check1.Value = CInt(GetSetting(App.EXEName, "Config", "Check1", 0))
    End Sub

  3. #3
    Fanatic Member Mxjerrett's Avatar
    Join Date
    Apr 2006
    Location
    Oklahoma
    Posts
    939

    Re: SaveSetting

    Here is a quick example:

    Code:
    Private Sub Command1_Click()
    SaveSetting App.EXEName, "Options", "chkTest", chkText.Value
    End Sub
    
    Private Sub Command2_Click()
    chkTest.Value = GetSetting(App.EXEName, "Options", "chkTest", 0)
    End Sub

    If a post has been helpful please rate it.
    If your question has been answered, pull down the tread tools and mark it as resolved.

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2007
    Location
     
    Posts
    453

    Re: SaveSetting

    Thanks all...
    Haikus are easy.
    But sometimes they don't make sense.
    Refrigerator.

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