Hello friends!
Is there any way to take print screen of a frame or panel?
Thanks in advance
One possible solution (for example, a snapshot of the button itself):
procedure TMainForm.UniButton1Click(Sender: TObject);
begin
with UniButton1 do
JSInterface.JSCode('html2canvas(document.querySelector("#' + JSId +'")).then(function(canvas) {ajaxRequest('#1', "getData", ["base64Data="+canvas.toDataURL()])});');
end;
procedure TMainForm.UniButton1AjaxEvent(Sender: TComponent; EventName: string;
Params: TUniStrings);
begin
if EventName='getData' then
begin
// Params.