Checkbox Controls

DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: Checkbox Controls

Hybrid View

  1. #1
    Join Date
    Jul 2005

    Checkbox Controls

    I am going to make this short and simple. I wish to have a program that when you click a checkbox to make it checked, I want it to be able to save the setting when I exit the program so when I go back into it then that same checkbox will be checked.

    I have many checkboxes in the program so will I have to do the code on each of the checkboxes if I even need a code for I have no idea what I'm doing with it.

    Thanks in Advance, Jobartley515

  2. #2
    Join Date
    Nov 2003
    Alameda, CA
    if you need to do the same operation with many checkboxes, you can create them as an array (call them with the same name and set the index property) or you can iterate through them using the form Controls collection:

    dim ctl as control
    for each ctl in Controls
    if typeof ctl is CheckBox then ... do something

    To save/restore to the registry, use the SaveSetting and GetSetting methods, put them in the form Load and Unload events (complete documentation in MSDN)

    This is to make really short and simple...
    "There are two ways to write error-free programs. Only the third one works."

  3. #3
    Join Date
    Jul 2005
    Okay thanks for the quick response, but I'm really knew to this and I don't know about the SaveSetting or GetSetting and I don't know how to use them.

    Any help on these topics?

    Thanks Jobartley515

  4. #4
    Join Date
    Nov 2003
    Portland, OR
    Type GetSetting and/or SaveSetting in VB's code editor, highlight the word and press F1. If that doesn't work, try searching Google for "vb getsetting" and/or "vb savesetting".
    Phil Weber

    Please post questions to the forums, where others may benefit.
    I do not offer free assistance by e-mail. Thank you!

Similar Threads

  1. Replies: 2
    Last Post: 08-01-2005, 04:12 PM
  2. ANN: .Net Compact Framework Controls
    By Keith in forum dotnet.announcements
    Replies: 0
    Last Post: 06-15-2003, 08:16 PM
  3. Hiding user controls vs dynamic creation
    By Senkwe in forum ASP.NET
    Replies: 2
    Last Post: 06-11-2002, 07:54 AM
  4. Masked Edit controls and disconnected recordsets
    By Chris Brown in forum VB Classic
    Replies: 1
    Last Post: 01-23-2001, 02:47 PM
  5. Replies: 0
    Last Post: 09-15-2000, 12:01 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
Latest Articles
Questions? Contact us.
Web Development
Latest Tips
Open Source

   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center