Hi, i have encountered some problems while running the following code, the result is not what i want.
------------------------------------------------------------
OS: Linux Mint 18.2 MATE-64Bit
Lazarus: 1.8.0 RC4 (FPC 3.0.4)
Code:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);
begin
if WindowState = wsFullScreen then
WindowState := wsNormal
else
WindowState := wsFullScreen;
end;
Running result:
Press Key WindowState
1 times wsFullScreen
2 times wsFullScreen
3 times wsNormal
4 times wsFullScreen
5 times wsFullScreen
6 times wsNormal
------------------------------------------------------------
OS: Windows 7-64Bit
Lazarus: 1.6.4 (FPC 3.0.2)
The same code:
procedure TForm1.FormKeyPress(Sender: TObject; var Key: char);
begin
if WindowState = wsFullScreen then
WindowState := wsNormal
else
WindowState := wsFullScreen;
end;
Running result:
Press Key WindowState
1 times wsMaximized
2 times wsMaximized
3 times wsNormal
4 times wsMaximized
5 times wsMaximized
6 times wsNormal
------------------------------------------------------------
I want the window to switch between wsFullScreen and wsNormal, but the result is not, is this a issue?