It seems Begin/EndInit was for this purpose but does not work the first time
the control is dropped on the form (Which it should). My object is a
component that sits on the form so can't use the form load as I may not be
the one writing the form, someone may just drop my component on their form.
I need to see after all properties are set if there are any
properties/components. that are no longer relevant that I can clean up. I
keep references in the properties that match up to names of other components
in the component list. I remove unreferenced components I add once I can
confirm they are no longer needed. I could do this as the user edits things
but that could be time consuming compared to on designer load the user would
hardly even notice.
[quoted text, click to view] "joeycalisay" wrote:
> What exactly are you trying to do?
>
> The OnLoad eventhandler of the Form is the only way I can think where you
> can do some routine after the execution of the InitializeComponent where all
> properties of controls used are set. DesignMode is frequently used as test
> at this virtual method.
>
> "WXS" <WXS@discussions.microsoft.com> wrote in message
> news:4DC2DC4D-4FCB-4585-AB22-C4B91A4C7BC7@microsoft.com...
> > Is there a reliable place where I can do some work after all of the
> > properties have been set?
> >
> > Controls/Components that need to know when all properties have been set
> > need to use ISupportInitialize BeginInit, EndInit and use the EndInit call
> > BUT Begin and EndInit are never called when the component is first dropped
> on
> > to the form, making this an unreliable method to use for design mode.
> >
> > Thanks,
> > Dave
>
>
What exactly are you trying to do?
The OnLoad eventhandler of the Form is the only way I can think where you
can do some routine after the execution of the InitializeComponent where all
properties of controls used are set. DesignMode is frequently used as test
at this virtual method.
[quoted text, click to view] "WXS" <WXS@discussions.microsoft.com> wrote in message
news:4DC2DC4D-4FCB-4585-AB22-C4B91A4C7BC7@microsoft.com...
> Is there a reliable place where I can do some work after all of the
> properties have been set?
>
> Controls/Components that need to know when all properties have been set
> need to use ISupportInitialize BeginInit, EndInit and use the EndInit call
> BUT Begin and EndInit are never called when the component is first dropped
on
> to the form, making this an unreliable method to use for design mode.
>
> Thanks,
> Dave