In my application (Main form is TTntForm, C++Builder 2006):
void __fastcall TForm1::Button1Click(TObject *Sender)
{
Caption=L"1st caption"; // This works.
Form1->Caption=L"2nd caption"; // But this doesn't work,
// Caption of the form remains "1st caption".
}
What might be the cause of this problem?
Edited: Thank you all for your answers. I found the bug. There was a twice form creation in project file:
Application->CreateForm(__classid(TForm1), &Form1);
Application->CreateForm(__classid(TForm1), &Form1);