T
Tilfried Weissenberger
Hi,
I would like to specify a group of Properties/Fields of some objects on a
WinForm, for which I would like to have the values loaded from the Registry,
and saved to it upon closing of the form.
ie. the form's Size, the positions and sizes of some controls on that form
should "remember" their state across the sessions of a user.
I thought a Hashtable would be a good idea to set the name of the
registry-entry as the Key name of the HT-entry, and the key-value would be
the value of the property/field.
but if I do this:
myHT.add("Form_Size", this.Size);
of course only the current-value of the size would be saved - or better, if
I changed the value in the hashtable to another size, the Form.Size would
not get updated. Are delegates suitable for properties/fields, or do I have
to do it another way? There must be a way to accomplish this!
Thanks for any input on this!
regards, Tilli
I would like to specify a group of Properties/Fields of some objects on a
WinForm, for which I would like to have the values loaded from the Registry,
and saved to it upon closing of the form.
ie. the form's Size, the positions and sizes of some controls on that form
should "remember" their state across the sessions of a user.
I thought a Hashtable would be a good idea to set the name of the
registry-entry as the Key name of the HT-entry, and the key-value would be
the value of the property/field.
but if I do this:
myHT.add("Form_Size", this.Size);
of course only the current-value of the size would be saved - or better, if
I changed the value in the hashtable to another size, the Form.Size would
not get updated. Are delegates suitable for properties/fields, or do I have
to do it another way? There must be a way to accomplish this!
Thanks for any input on this!
regards, Tilli