Is it advisable for me to touch the designer.cs file for my windows form application? As I am referencing the labels to my settings file, I plan to code it in such a way that if my settings file shows
int startup = 0;
the code handler for my combo box selection would be
if (settingObject.bootOnStartup == 0)
{
comboStartup.SelectedIndex = 0;
}
else
{
comboStartup.SelectedIndex = 1;
}
it does works for its function but it sort of crashes the design window.
Don’t modify the .designer.cs files, ever. Whatever you do in it, it will be overwritten the next time you edit your Form in the designer, so you will have to do it again. I don’t see any reason not to put this code in the Form constructor or the
Loadevent…