Ich fand die Antwort. Es ist lustig. ungefähr 2 Tage, die ich suche und kein Erfolg fand ich die Antwort, nachdem ich meine Frage gepostet habe. Ich beantworte es selbst, vielleicht ist es nützlich für eine andere Person.
fand ich diesen Code auf dieser Seite https://github.com/vintagedave/firemonkey-container/blob/master/Parnassus.FMXContainer.pas
function EnumWindowCallback(hWnd: HWND; lParam: LPARAM): BOOL; stdcall;
const
FMXClassName = 'TFMAppClass';
var
ProcessID : DWORD;
ClassName : string;
ClassNameLength : NativeInt;
begin
// XE4 (possibly others) show a phantom TFMAppClass window on the taskbar. Hide it.
// Ensure the one we hide belongs to this thread/process - don't damage other FMX apps
if (GetWindowThreadProcessId(hWnd, ProcessID) = GetCurrentThreadId) and (ProcessID = GetCurrentProcessId) then begin
// Thanks to the ubiquitous David Heffernan... http://stackoverflow.com/questions/7096542/collect-all-active-window-class-names
SetLength(ClassName, 256);
ClassNameLength := GetClassName(hWnd, PChar(ClassName), Length(ClassName));
if ClassNameLength = 0 then RaiseLastOSError;
SetLength(ClassName, ClassNameLength);
if ClassName = FMXClassName then begin
// Found. Hide it, and return false to stop enumerating
ShowWindow(hWnd, SW_HIDE);
Exit(False);
end;
end;
Result := True; // Fallthrough, keep iterating
end;
wenn Sie den folgenden Code verwenden, es zu benutzen, wird das andere Symbol auf der Taskleiste
EnumWindows(@EnumWindowCallback, 0);
Da Sie suchen, versteckt werden Windows in einem bestimmten Thread, sollten Sie ['EnumThreadWindows()'] (https://msdn.microsoft.com/en-us/library/windows/desktop/ms633495.aspx) anstelle von 'EnumWindows()' verwenden. Oder verwende stattdessen 'FindWindow()'. –