I need to open a form in Delphi , but instead of calling it direct by the name UniForm1
, I need to call it by the value stored in a String p>
procedure TMainForm.UniTreeView1Change(Sender: TObject; Node: TUniTreeNode);
var nome : string;
tela : TUniForm;
begin
nome := Node.Text;
tela := FindComponent(nome) as TUniForm;
//UniPanel1.Caption := nome;
tela.Parent := UniPanel1;
tela.Show;
tela.SetFocus;
end;
However, when I select an item in TreeView , the following error occurs and does not open the form:
Project Log_Project.exe raised exception class $ C0000005 with message 'access violation at 0x006d0f13: read of adress 0x000003ce'.