Please forgive me if my thought process is incorrect. I'm only a programmer in my spare time, with no formal training.
I'm using VB.net to create a very basic application, but some settings need to be read on startup. So my theory is that in the Form1.Load
area, add all the checks for various settings and apply the settings as needed.
Next, changing settings on the fly while the application is running. I see a few different possibilities:
- Create subroutines for each setting check. As each checkbox or radio button is clicked, call the appropriate sub-routine. As the form loads, run through all these subroutines.
- Call the
Form1.Load
subroutine on any settings change (larger programs, I could see this being VERY slow) - Repeat myself, and execute the code as soon as the option is changed. Have the
Form1.Load
subroutine execute the settings check on every control, and remember to add newer settings to the sub as they get built or changed.
Option 1 seems to be the most logical in my head. Is this the most sustainable method for projects, or is there a better way to ensure settings change as the options change?
For example, I have a checkbox that controls whether the output window is a Fixed Width font, or a regular font. The check box gets and saves its settings to the App.config
file, so the option is persistent across program starts.