Results 1 to 4 of 4

Thread: [RESOLVED] Save to registry

  1. #1

    Thread Starter
    Hyperactive Member leeprice2006's Avatar
    Join Date
    Jul 2006
    Posts
    258

    Resolved [RESOLVED] Save to registry

    I need code that will save information to registry. For example, if the user clicks a check box everytime the application is loaded then the check box is ticked, however if they untick the check box it will load with the check boxes unticked.

    I also need this for Option boxes, Text boxes.

    Please help
    Hello, Im a complete beginner so I if I ask obvious questions don't laugh. I have had no special training and I thought I'd learn and I thought this is the best place to start.

    I started off using VB 6.0 but when I bought a new computer I decided to upgrade to VB 2005, so its a little bit different to what i'm used to

  2. #2
    PowerPoster gavio's Avatar
    Join Date
    Feb 2006
    Location
    GMT+1
    Posts
    4,462

    Re: Save to registry

    VB Code:
    1. Private Sub Form_Load()
    2.     Check1.Value=GetSetting(appname:="myApp", section:="Settings", Key:="CheckValue", Default:="1") 'default 1 (checked) for the first load
    3. End Sub
    4.  
    5. Private Sub Check1_Click()
    6.     SaveSetting "myApp", "Settings", "CheckValue", Check1.Value
    7. End Sub
    It goes pretty much the same for OptionBox and TextBox.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Save to registry

    Martin's CodeBank submission should provide you with the information that you need.

  4. #4

    Thread Starter
    Hyperactive Member leeprice2006's Avatar
    Join Date
    Jul 2006
    Posts
    258

    Re: Save to registry

    Thanks!
    Hello, Im a complete beginner so I if I ask obvious questions don't laugh. I have had no special training and I thought I'd learn and I thought this is the best place to start.

    I started off using VB 6.0 but when I bought a new computer I decided to upgrade to VB 2005, so its a little bit different to what i'm used to

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