man setzt wsFullScreen (3)
danach steht WindowState aber erstaunlicherweise auf
wsMaximized (2)
dann stimmt natürlich die Abfrage nicht mehr.....
Schuld ist die Procedure
ShowWindow(Handle, ShowCommands[Value]);
in der Unit CustomForm.inc
Code: Alles auswählen
procedure TCustomForm.SetWindowState(Value : TWindowState);
const
ShowCommands: array[TWindowState] of Integer =
(SW_SHOWNORMAL, SW_MINIMIZE, SW_SHOWMAXIMIZED, SW_SHOWFULLSCREEN);
begin
if FWindowState <> Value then
begin
FWindowState := Value;
//DebugLn(['TCustomForm.SetWindowState ',DbgSName(Self),' ',ord(FWindowState),' csDesigning=',csDesigning in ComponentState,' Showing=',Showing]);
if (not (csDesigning in ComponentState)) and Showing then
ShowWindow(Handle, ShowCommands[Value]); // H I E R passiert es
end;
end;
hier wird WindowState irgendwie umgesetzt.
Vor dem Aufruf von ShowWindow ist WindowState noch wsFullScreen
nach dem Aufruf ist WindowState dann wsMaximized
weitere Recherche:
function ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
begin
Result := WidgetSet.ShowWindow(hWnd,nCmdShow);
end;
bei wsFullScreen wird an Widget.ShowWindow
nCmdShow = 11
übergeben
dann wird
TWin32WidgetSet.ShowWindow
aufgerufen und hier steht folgendes:
Code: Alles auswählen
function TWin32WidgetSet.ShowWindow(hWnd: HWND; nCmdShow: Integer): Boolean;
begin
if nCmdShow = SW_SHOWFULLSCREEN then // hier passiert dann die Umsetzung
nCmdShow := SW_SHOWMAXIMIZED;
Result := Boolean(Windows.ShowWindow(hWnd, nCmdShow));
end;