I want to return some (or all) of the controls on a form to their initial state (as defined on the properties of the design screen) on the click of a radio button on that form.
Obviously i can hardcode the the changes for the controls but i was looking for a more generic way of doing it.
I dont want to call the form load event routine because it does all sorts of background data setting up i dont want done again.
I found the automatically generated subroutine InitializeComponent(which is presumably called in the background on or just before the load event) however calling it causes an infinite loop because the radio button event is fired(i think).
The other solutions coming to mind are either
1) suppress all events call initializecomponenet then switch events back on (vaguely remember acommand in excel BA that does that) or
2) cycle around the controls collection and restore some kind of default properties back to the control - ignoring the ones causing the problem.
Neither of the solutions i've managed to figure out how to do.
I have just started using vb.net 2008 after using VBA/VB6 for a couple of years I would appreciate some pointers.
Many thanks in anticipation and thanks to all the people posting on this forum for help in the past.
Obviously i can hardcode the the changes for the controls but i was looking for a more generic way of doing it.
I dont want to call the form load event routine because it does all sorts of background data setting up i dont want done again.
I found the automatically generated subroutine InitializeComponent(which is presumably called in the background on or just before the load event) however calling it causes an infinite loop because the radio button event is fired(i think).
The other solutions coming to mind are either
1) suppress all events call initializecomponenet then switch events back on (vaguely remember acommand in excel BA that does that) or
2) cycle around the controls collection and restore some kind of default properties back to the control - ignoring the ones causing the problem.
Neither of the solutions i've managed to figure out how to do.
I have just started using vb.net 2008 after using VBA/VB6 for a couple of years I would appreciate some pointers.
Many thanks in anticipation and thanks to all the people posting on this forum for help in the past.