IShareInterface = interface
['{6BDC2AD1-89AE-4CF7-90FC-FF5997246846}']
Procedure showResult(state:string); //NONE,PASS,FAIL,WARN
end;
procedure TForm2.showResult(state: string);
begin
ShowMessage('My Vcl :'+state);
// or u create a form and showmodal, same effect
end;
At FMX Plugin,
I put TEdit, TButton
On Button Click:
procedure TForm1.Button1Click(Sender: TObject);
begin
(Host As IShareInterface).showResult('U cannot close noq');
end;
If you dont click the button, u close the application.
if you click the button and showmessage, then u click close in the form, it never close.
unitil u click into the tedit or the click the plugin form any where, u can close;
Hi,
I can reproduce this issue.
as a temporary workaround, you can use this code:
procedure TForm1.Button1Click(Sender: TObject);
begin
(Host As IShareInterface).showResult('U cannot close noq');
(Self.ControlAsVisualPlugin as THYFMXControlAsVisualPlugin).HostFocusLost; //added
end;
it will return possibility to close main form.
Edit: Minimizing issue, add this code to host main form:
procedure TForm2.resetFocus(Sender: TObject);
begin
PluginContainer.SetFocus;
end;
procedure TForm2.FormCreate(Sender: TObject);
begin
Application.OnRestore := resetFocus;
end;
comment code inside THYVCLCrossPlatformPanel.CMUIActivate (uHYVCLCrossPlatformPanel.pas) like
procedure THYVCLCrossPlatformPanel.CMUIActivate(var Message: TMessage);
begin
// if (GetParentForm(Self).ActiveControl = Self) and (not fFocusChanging) then
// Windows.SetFocus(CrossPlatformVisualPlugin.GetHandle);
end;
after this launch C:\Program Files (x86)\RemObjects Software\Build\install_HY.cmd for recreating packages.