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.
> Is there a reliable place where I can do some work after all of the
> properties have been set?
[quoted text clipped - 6 lines]
> Thanks,
> Dave
WXS - 10 Dec 2004 20:55 GMT
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.
> What exactly are you trying to do?
>
[quoted text clipped - 14 lines]
> > Thanks,
> > Dave
joeycalisay - 13 Dec 2004 01:50 GMT
Have you tried the OnCreateControl for Control types or the OnLoad for
UserControl types?
> 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
[quoted text clipped - 26 lines]
> > > Thanks,
> > > Dave