okkoos Posted February 22, 2013 Share Posted February 22, 2013 Hi; I want to create a form embedded in the panel runtime.I created a default unigui VCL Application / Standalone server application, I added a Unibutton and UniPanel to MainUnit-MainForm. Subsequently add a free-form to application. and than I tried to create the Unit1-Form1 on UnitMain-MainForm-Panel1 with MainForm-Button1 onclick event. uses uniGUIVars, MainModule, uniGUIApplication, Unit1; function MainForm: TMainForm; begin Result := TMainForm(UniMainModule.GetFormInstance(TMainForm)); end; procedure TMainForm.UniButton1Click(Sender: TObject); var Xform : TUniForm1; begin Xform := TUniForm1.Create(uniApplication); Xform.Parent:= Unipanel2; xform.Show(); Xform.Align := alClient; end; initialization RegisterMainFormClass(TMainForm); end. but I got the following errors. First run; click button1 got Access violation error ; click "Tamam" button; click "Tamam" button again Form2 not embed to MainForm.Panel2; How can I solve this problem or anyway to create runtime panel embeded form. Best regards. Quote Link to comment Share on other sites More sharing options...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.