Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure TPanel.Resize;
- begin
- inherited;
- ResizeForm();
- end;
- procedure TPanel.ResizeForm;
- begin
- if Assigned(FForm) then
- Platform.SetWindowRect(FForm, RectF(BorderWidth, BorderWidth,
- ClientWidth + BorderWidth, ClientHeight + BorderWidth));
- end;
- procedure TPanel.SetForm(const AForm: TCommonCustomForm);
- begin
- FForm := AForm;
- FForm.BorderIcons := [];
- FForm.BorderStyle := TFmxFormBorderStyle.bsNone;
- ResizeForm();
- FForm.Visible := True;
- Winapi.Windows.SetParent(FmxHandleToHWND(FForm.Handle), Handle);
- end;
- procedure TForm25.Button1Click(Sender: TObject);
- var
- F: Unit26.TForm26;
- begin
- F := TForm26.Create(nil);
- try
- F.ShowModal;
- finally
- F.Free;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement