Hi there,
Now, there's just one more thing I wonder:
I know when I have to read the properties (from the settings file), but
how can I find out if the user changed a property at design time and
save the changes to the file? I want to avoid that the properties are
saved if they are made by code at run-time, but they should be saved if
they are made at design time.
Well this is done automatically for you, the properties that are
modified by the user are stored in the automatically generated code section,
which is hidden in 2005 (not quite sure where it is now).
One way of testing for a property change would be to add code to the Set
part of the property accessor. Check the value coming in and see if it
..Equals the current value, if not then set it and you now know that a change
was made, you could then save the properties to a file. I'm not sure what
kind of performance hit this might give the idea if you have allot of
properties in the control.
As for checking to see if you are in design-time or run-time I am unsure
of this. And unfortuantely do not have enough time to look into it right
now. AFAIK you need to be looking for the Context which the application is
running in. Anyway, I hope this helps.
Nick.