Remove firemonkey from the Windows taskbar

Is there any way to remove my firemonkey application panel from the windows XP / vista / 7 taskbar? No information when I google.

Problem:

How to hide the form located in the dll from the Windows taskbar.

+4
source share
1 answer

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.

+2
source

Source: https://habr.com/ru/post/1388932/


All Articles