Results 1 to 4 of 4

Thread: [RESOLVED] Simple question with saving checkboxes

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    Resolved [RESOLVED] Simple question with saving checkboxes

    Read slowly! How can i save the value of a checkbox when clicking, so when the program loads, the checkbox will be checked if it was checked the last time the program was used, or the check will be unchecked, if the checkbox was unchecked last time the program was used.

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

    Re: Simple question with saving checkboxes

    You can use registry:
    VB Code:
    1. Private Sub Form_Load()
    2.     Check1.Value = GetSetting(App.EXEName, "LastValues", "Check1", 0)
    3. End Sub
    4.  
    5. Private Sub Form_Unload(Cancel As Integer)
    6.     SaveSetting App.EXEName, "LastValues", "Check1", Check1.Value
    7. End Sub

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 2007
    Posts
    93

    Re: Simple question with saving checkboxes

    I got it working how i like, thanks a lot. I look around first but didnt really see anything.
    Last edited by stevevb6; Feb 12th, 2007 at 08:54 PM.

  4. #4

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