Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

Updating a Form After Settings Change

$
0
0

Hi,

I have two main forms in my project. One is the main GUI and the other is a settings/options form (opened using Tools -> Options on a ToolStrip). The options form contains a few settings, such as a checkbox to determine whether or not to show gridlines (cell borders) in a DataGridView. If the user clicks "OK," the settings are saved in the main settings file for the project (accessed through the project's properties).

My question: How could I immediately make changes to the main form according to those changes saved to the settings file when exiting the options menu? I could read in the settings in the form load event, but that would only trigger after restarting the application. Will I have to close the form when the options form pops up and create a new instance of it after settings are saved (to call the form load event again)? This sounds messy, so I'd love to know if there is there a more efficient way to do this.

Thanks!


When I was a young warthooooooooog.


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>