Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AfterInitializeComponent() ??
Message
De
12/11/2004 13:14:45
 
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00960888
Message ID:
00960942
Vues:
7
>Never mind my last post...

See my reply to your last post. <g>

~~Bonnie



>Here's what i found, the this.ResumeLayout(false) statement seems to always be the last line of InitializeComponent() so here's a cleaner solution i found:
>
>
>public new void ResumeLayout(bool resume)
>{
>	if (!this.formInitisComplete)
>	{
>		this.formInitisComplete = true;
>		this.AfterInitializeComponent();
>	}
>	base.ResumeLayout(resume);
>}
>
>
>>Stephane,
>>
>>The base class's constructor executes in it's entirety before the derived class's constructor, so you wouldn't be able to put a call to an AfterInitializeComponent() in the constructor of the base class. But, a class's Load event fires next (after both constructors, base and derived), so you could put a call to an AfterInitializeComponent() in your base class's Load event handler (which will execute in it's entirety before the derived class's Load event).
>>
>>~~Bonnie
>>
>>
>>
>>>Another C# newbie question...
>>>
>>>I want to put in a base class, code that would execute right after the Default constructor of the derived class.
>>>
>>>Where would i put this code ? And make sure it'always executed.
>>>
>>>Thanks
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform