Application fails to load settings only at windows startup
My program uses an XML to store it's settings by way of serialization. Everything is fine when attempting to load these settings when the program is started, except when the program is starting with windows.
In the Form_Load event, the program does this:
and LoadSettings() consists of:
// error stuff
No error is ever produced as far as I can manage to create one. Yet when windows is starting up the program is just blank, no matter what the settings are in the xml. Close the program and restart it, and the settings are loaded. What could be doing this?
XmlSerializer settingsXML = new XmlSerializer(typeof(SettingsClass));
using (FileStream loadFile = new FileStream("settings.xml", FileMode.Open))
Settings = (SettingsClass)settingsXML.Deserialize(loadFile);