NB: Talibek answered his question in the question, for clarity, I moved it here.
You need to get your main form descriptor ( Form1.Handle ), because there is no Application.handle in firemonkey, and then convert it using FmxHandleToHWND ( FMX.Platform.Win ) to a regular window descriptor. You need to extract this handle from your host application (you can export a function with it) and do the following:
h := GetHandle(); ShowWindow(h, SW_HIDE); SetWindowLong(h, GWL_EXSTYLE, GetWindowLong(h, GWL_EXSTYLE) or WS_EX_TOOLWINDOW); ShowWindow(h, SW_SHOW);
Handle Removal:
class function TForm1.returnHandle(): integer; begin result := FmxHandleToHWND(Form1.Handle); end;
Of course, the Application.MainFormOnTaskBar property must be set to true , so the form can process the application.
Hope this helps someone.
source share