Connecting Tech Pros Worldwide Forums | Help | Site Map

What is the next event to fire after the OnCreateControl?

Greg
Guest
 
Posts: n/a
#1: Oct 24 '06
I am designing an inherited control. Besides the OnCreateControl , what
other events can be listened to that the if(!DesignMode) test willl
work? The reason I am asking is that a customer has asked to hide the
control. However, setting the controls visible property to false means
that the OnCreateControl which contains some essential processing never
fires. I need somewhere else to relocate this code, presumably in the
next event after the OnCreateControl event. Also, is there is a
published list of events in the lifecyle of a winforms control? I
can't find anything on this!

TIA

Greg.


Daniel
Guest
 
Posts: n/a
#2: Oct 24 '06

re: What is the next event to fire after the OnCreateControl?


Depending on what it is, if this code is essential to the control running,
it should be in constructor. usually a initialise method and have that
called by constructor.

"Greg" <spam_gw001@yahoo.co.ukwrote in message
news:1161698229.026473.111230@e3g2000cwe.googlegro ups.com...
Quote:
>I am designing an inherited control. Besides the OnCreateControl , what
other events can be listened to that the if(!DesignMode) test willl
work? The reason I am asking is that a customer has asked to hide the
control. However, setting the controls visible property to false means
that the OnCreateControl which contains some essential processing never
fires. I need somewhere else to relocate this code, presumably in the
next event after the OnCreateControl event. Also, is there is a
published list of events in the lifecyle of a winforms control? I
can't find anything on this!
>
TIA
>
Greg.
>

Greg
Guest
 
Posts: n/a
#3: Oct 24 '06

re: What is the next event to fire after the OnCreateControl?


Thanks Daniel, but I need to be able to differentiate between run and
design time since the app I have written is for a mini-IDE.

Regards,

Greg.


Daniel wrote:
Quote:
Depending on what it is, if this code is essential to the control running,
it should be in constructor. usually a initialise method and have that
called by constructor.
>
"Greg" <spam_gw001@yahoo.co.ukwrote in message
news:1161698229.026473.111230@e3g2000cwe.googlegro ups.com...
Quote:
I am designing an inherited control. Besides the OnCreateControl , what
other events can be listened to that the if(!DesignMode) test willl
work? The reason I am asking is that a customer has asked to hide the
control. However, setting the controls visible property to false means
that the OnCreateControl which contains some essential processing never
fires. I need somewhere else to relocate this code, presumably in the
next event after the OnCreateControl event. Also, is there is a
published list of events in the lifecyle of a winforms control? I
can't find anything on this!

TIA

Greg.
Daniel
Guest
 
Posts: n/a
#4: Oct 24 '06

re: What is the next event to fire after the OnCreateControl?


Ah this is for a development environment?

Well if they are hiding the control then it cannot be seen or used anyway,
you could have it fire on being made visible? Not 100% of your requirements
or use so this may be wrong.


"Greg" <spam_gw001@yahoo.co.ukwrote in message
news:1161705672.350217.112570@m73g2000cwd.googlegr oups.com...
Quote:
Thanks Daniel, but I need to be able to differentiate between run and
design time since the app I have written is for a mini-IDE.
>
Regards,
>
Greg.
>
>
Daniel wrote:
Quote:
>Depending on what it is, if this code is essential to the control
>running,
>it should be in constructor. usually a initialise method and have that
>called by constructor.
>>
>"Greg" <spam_gw001@yahoo.co.ukwrote in message
>news:1161698229.026473.111230@e3g2000cwe.googlegr oups.com...
Quote:
>I am designing an inherited control. Besides the OnCreateControl , what
other events can be listened to that the if(!DesignMode) test willl
work? The reason I am asking is that a customer has asked to hide the
control. However, setting the controls visible property to false means
that the OnCreateControl which contains some essential processing never
fires. I need somewhere else to relocate this code, presumably in the
next event after the OnCreateControl event. Also, is there is a
published list of events in the lifecyle of a winforms control? I
can't find anything on this!
>
TIA
>
Greg.
>
>

Closed Thread