Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form caption
Message
 
To
07/07/2005 01:02:25
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Miscellaneous
Thread ID:
01029813
Message ID:
01029901
Views:
20
>>Hilmar,
>>Make sure you put the code after InitializeComponent()
>>
>>public Form1(string paraCaption)
>>{
>>	InitializeComponent();
>>	this.Text = paraCaption;
>>}
>>
>
>Thanks.
>
>Sure enough, I had put it before. Your suggestion made it work; it is indifferent whether I use Text or this.Text.
>
>Now I also realize the reason - InitializeComponent() will simply overwrite whatever assignments I make.

I am glad it works for you. I think it is cleaner to use this.Text compared to just Text and also the intellisense kicks in after the dot. Most of the time you want to put all your constructor code after InitializeComponent() but there are some cases where you want to put it before (and ofcourse now I can't think of any<s>).
Einar
Semper ubi sub ubi.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform