C
Charles Law
Can anyone explain the following behaviour?
Create a new, blank project, and place an ActiveX control (e.g. WebBrowser
control) on Form1. Now run the solution.
The sequence of events is:
Form1.New() begins
Form1.New() ends
Form1_Load() called
....
Now create a user control and put the ActiveX control on it. Put the user
control on Form1 instead of the ActiveX control. Now run the solution.
The sequence of events is:
Form1.New() begins
UserControl1. New() begins
UserControl1_Load() begins
UserControl1_Load() ends
UserControl1. New() ends
Form1.New() ends
Form1_Load() called
....
The two behaviours do not seem consistent. Is this what people would expect
to happen?
I would expect something like
Form1.New() begins
UserControl1. New() begins
UserControl1. New() ends
UserControl1_Load() begins
UserControl1_Load() ends
Form1.New() ends
Form1_Load() called
....
TIA
Charles
Create a new, blank project, and place an ActiveX control (e.g. WebBrowser
control) on Form1. Now run the solution.
The sequence of events is:
Form1.New() begins
Form1.New() ends
Form1_Load() called
....
Now create a user control and put the ActiveX control on it. Put the user
control on Form1 instead of the ActiveX control. Now run the solution.
The sequence of events is:
Form1.New() begins
UserControl1. New() begins
UserControl1_Load() begins
UserControl1_Load() ends
UserControl1. New() ends
Form1.New() ends
Form1_Load() called
....
The two behaviours do not seem consistent. Is this what people would expect
to happen?
I would expect something like
Form1.New() begins
UserControl1. New() begins
UserControl1. New() ends
UserControl1_Load() begins
UserControl1_Load() ends
Form1.New() ends
Form1_Load() called
....
TIA
Charles