I'm making a custom COMPONENT that is derived from
DataSet. I've implemented a custom serializer to generate
the code I need which is working - when the controls are
placed onto the form, and thus the code is generated, in a
specific order. When the controls are added in a different
order, the code breaks. This is because the component
references the Text property of some related controls on
the form. If the control is placed before the component,
it works. If its not, the Text is a Null value and this
causes problems during deserialization.
So I need to be able to do some processing at the VERY END
OF the InitializeComponents() function. I found and
implemented the ISupportInitialize interface which gives
me a BeginInit and EndInit function. Adding my custom
processing here works, but ONLY DURING AN ACTUAL RUN. If
the form is loaded up and deserialized by the designer, it
does NOT EXECUTE EndInit() and therefore the processing
isn't done and therefore the component DOES NOT WORK IN
DESIGN MODE.
How come the designed doesn't execute EndInit()? What can
I do to cause code to be placed at the end of the
InitializeComponents() function?
Bill
|