I have a form with multiple checkboxes what I would like to do is to have it that if someone selects any combination of the checkboxes they could save those selections by pressing a button named save options or something to that affect it would then save those selections then they could load them by pressing another button load options and run them with another button named run options (or the box that loads could run too) not sure the best way to do it
the goal is ultimately to have a button that allows the state of the checkboxes to be saved and then run as a custom option.
how would I do this I cannot find anything on the internet ?
My.Settings could be used, depending on how user-specific you want to go. If this is a matter of saving settings that can be restored the next time you run the program, My.Settings would work fine. If you want to be able to store a variety of different 'configurations', then I would be inclined to put the configuration settings into a structure, and serialzie the structure to a file. That could be made into a pretty complex animal, if needed.
For this example to work, your checkboxes must be in a GroupBox or Panel named grpCheckBoxContainer and your checkboxes' names must be chkCheckBox1, chkCheckBox2, etc., but you can easily change those.
minitech,
they are all individual checkboxes so I don't believe what you posted will work.
Shaggy Hiker,
I'm looking to make it so you could save individual configurations and then run them by clicking a button that says custom this way it can be custom tailored to any selection of options.
computerman,
Im not understanding the logic in the example you posted
Code:
iif(checkbox.checked = true,true,false)
what does the true true false do and how would I save this file ?
If you look at the attached image you can see how the check boxes are used for individual users for my application. I have also supplied the code for that form.
I hope it is of use.
Computerman
It was much easier in VB6, but I am now liking Vb.Net alot more.
Ok I get the boolean part but how do I save it to a file ? and how do I retrieve that file, sorry for so many questions just started VB at the beginning of this month.
(offtopic) I can't beleive how many things are not in the books.