FMX (Firemonkey) can easily achieve a lot of VCL cannot or difficult to implement special effects, so the FMX program as an interface, packaged into the DLL by the VCL program call, is a good solution. For the completeness of the program, you do not want to see the FMX program displaying icons on the taskbar. However, normal Windows functions do not seem to work, such as after you get the FMX form handle, using the ShowWindow function to hide the taskbar icon, the result is useless. In fact, the reason is very simple, but you use the handle is not correct.
The correct source code I paste out, specifically I will not explain, I believe that the basis of the people can read.
UnitUnit1;Interfaceuseswinapi.windows, Winapi.messages, System.sysutils, System.types, System.uitypes, system.classes, System.Variants, FMX. Platform.win, FMX. Types, FMX. Controls, FMX. Forms, FMX. Graphics, FMX. Dialogs, FMX. Controls.presentation, Fmx.stdctrls;typeTForm1=class(tform) Button1:tbutton; procedureButton1Click (Sender:tobject); Private {Private Declarations} Public {Public Declarations} End;varForm1:tform1;Implementation{$R *.FMX}procedureTform1.button1click (sender:tobject);begin //Hide the main program icon in the taskbarShowWindow (Applicationhwnd, sw_hide); //Hide the main program icon in ALT + TABSetWindowLong (Applicationhwnd, Gwl_exstyle, Ws_ex_toolwindow Or getwindowlong (Applicationhwnd, GWL_EXSTYLE));End;End.
This code is compiled in Delphi XE8 and is correctly debugged.
Firemonkey hiding the taskbar icon