Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
AfterInitializeComponent() ??
Message
 
À
12/11/2004 12:23:27
Information générale
Forum:
ASP.NET
Catégorie:
Formulaires
Divers
Thread ID:
00960888
Message ID:
00960932
Vues:
8
Never mind my last post...
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform