C
Charles Law
Further to my issue about user controls, I have a problem with DesignMode.
Here is the project hierarchy:
MainApp
|_ Project1
|_ SubProject (UserControl)
SubProject has a default constructor (New) which does the MyBase.New() thing
and then InitializeComponent().
When I open the Project1 form in the IDE (design time), on which SubProject
is placed, the New method executes, and DesignMode is False. If I then
change a property of SubProject in the property grid (still in Project1)
then DesignMode (in SubProject) is reported as True.
The same thing happens with the SubProject_Load event, that is it reports
DesignMode False when opening the Project1 form in design mode.
Where can I put code that must only run when MainApp runs? Does that all
make sense?
TIA
Charles
Here is the project hierarchy:
MainApp
|_ Project1
|_ SubProject (UserControl)
SubProject has a default constructor (New) which does the MyBase.New() thing
and then InitializeComponent().
When I open the Project1 form in the IDE (design time), on which SubProject
is placed, the New method executes, and DesignMode is False. If I then
change a property of SubProject in the property grid (still in Project1)
then DesignMode (in SubProject) is reported as True.
The same thing happens with the SubProject_Load event, that is it reports
DesignMode False when opening the Project1 form in design mode.
Where can I put code that must only run when MainApp runs? Does that all
make sense?
TIA
Charles