Hilmar,
Make sure you put the code after InitializeComponent()
public Form1(string paraCaption)
{
InitializeComponent();
this.Text = paraCaption;
}
Einar
>I tried to assign a form caption, depending on a parameter passed to the constructor.
>
>I tried both of the following alternatives:
>
>
>Text = "Some caption";
>
>// or:
>
>this.Text = "Some caption";
>
>
>According to the debugger (and also, if I change the commands to a MessageBox()) the commands get executed, but the title doesn't change.
>
>By the way, I have the commands in a form constructor, which accepts a string parameter; the caption is supposed to change depending on the caption.
>
>TIA,
>
>Hilmar.
Semper ubi sub ubi.