Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
AfterInitializeComponent() ??
Message
 
To
12/11/2004 12:23:27
General information
Forum:
ASP.NET
Category:
Forms
Miscellaneous
Thread ID:
00960888
Message ID:
00960932
Views:
7
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform