Also ich hab mal ein bischen rumprobiert und folgendes ist dabei rausgekommen :
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17:
| procedure TForm1.Button1Click(Sender: TObject); var NewFormName: TForm; begin form1.Name := 'NewFormName'; NewFormName := (TForm(Application.FindComponent('NewFormName')));
NewFormName.Caption := 'NewFormName'; Showmessage(NewFormName.Caption); form1.Caption := 'Form1'; Showmessage(form1.Caption); Showmessage(NewFormName.Caption); end; |
Ob das einen Sinn hat, ist zweifelhaft, aber so kann man tatsächlich einer Form während der Laufzeit einen neuen Namen verpassen...
