L
Linus
Hi,
I'm using My.Settings to save the state of controls in my form. The
data is read in from My.Settings in the New section in the form. The
problem is that I've got a Sub that catches all the changes in the
different controls and saves ALL control states to My.Settings. This
is to not have 30-40 different Subs handling every control
independently. So when a for example text is read in from My.Settings
and put into a textbox, every other control will be written to
My.Settings empty because they haven't had their data put into them
yet. I've fixed this by using a global boolean variable to state
wheter the program is in startup or not and if anything should be
written to My.Settings or not.
I'm wondering if there's a more elegant way to do this. I thought of
using My.Application.Startup and Shutdown but the form hasn't been
initialized yet or has been disposed of already.
Linus
I'm using My.Settings to save the state of controls in my form. The
data is read in from My.Settings in the New section in the form. The
problem is that I've got a Sub that catches all the changes in the
different controls and saves ALL control states to My.Settings. This
is to not have 30-40 different Subs handling every control
independently. So when a for example text is read in from My.Settings
and put into a textbox, every other control will be written to
My.Settings empty because they haven't had their data put into them
yet. I've fixed this by using a global boolean variable to state
wheter the program is in startup or not and if anything should be
written to My.Settings or not.
I'm wondering if there's a more elegant way to do this. I thought of
using My.Application.Startup and Shutdown but the form hasn't been
initialized yet or has been disposed of already.
Linus