Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
LCL
»
[SOLVED] Fullscreen
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Not able to add any compo...
by
TRon
[
Today
at 03:28:14 am]
Can TreeView Node Colours...
by
wp
[
Today
at 01:08:11 am]
TAnchorDockPanel - Save a...
by
kapibara
[
Today
at 01:07:22 am]
Run time error 3162112
by
TRon
[
Today
at 12:42:08 am]
Absolute positioning of c...
by
jmpessoa
[
Today
at 12:23:03 am]
Fpcupdeluxe
by
Tony Stone
[December 01, 2023, 11:56:54 pm]
Has anyone used Free Pasc...
by
schuler
[December 01, 2023, 11:21:03 pm]
GUI for ChatGPT (yarvis)
by
schuler
[December 01, 2023, 11:07:43 pm]
Why cannot this be inline...
by
PascalDragon
[December 01, 2023, 10:29:01 pm]
TPath enhancements (Issue...
by
PascalDragon
[December 01, 2023, 10:12:16 pm]
Sleep forever
by
PascalDragon
[December 01, 2023, 09:57:47 pm]
Improvement for TFPHTTPCo...
by
PascalDragon
[December 01, 2023, 09:47:43 pm]
[SOLVED] Titlebar custom ...
by
Pe3s
[December 01, 2023, 09:25:41 pm]
Un-register an LCL Compon...
by
JuhaManninen
[December 01, 2023, 09:19:48 pm]
TFPHTTPClient.Get(URL) / ...
by
dseligo
[December 01, 2023, 09:14:00 pm]
i can't inatall Dam dialo...
by
tetrastes
[December 01, 2023, 08:36:29 pm]
Finding Zen GL C librarie...
by
Seenkao
[December 01, 2023, 08:30:51 pm]
Any library to generate a...
by
Kurt
[December 01, 2023, 08:15:15 pm]
How to print a DrawGrid
by
paweld
[December 01, 2023, 07:08:06 pm]
Winsoft libraries
by
domasz
[December 01, 2023, 06:48:40 pm]
Lazarus Release Candidate...
by
dedrasta
[December 01, 2023, 06:17:59 pm]
Masking password entry in...
by
imperiusdamian
[December 01, 2023, 05:02:58 pm]
What is the meaning of TF...
by
kwyan
[December 01, 2023, 04:45:14 pm]
Something like 'fpcupdelu...
by
avra
[December 01, 2023, 04:23:11 pm]
Noting responds when send...
by
Hartmut
[December 01, 2023, 03:11:11 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 561 times)
Pe3s
Hero Member
Posts: 515
[SOLVED] Fullscreen
«
on:
September 22, 2023, 12:43:25 pm »
Hello forum members
I came up with code that supports full screen, but does not cover the entire screen. How can I improve the code?
Code: Pascal
[Select]
[+]
[-]
procedure
TForm1
.
Button1Click
(
Sender
:
TObject
)
;
const
Rect
:
TRect
=
(
Left
:
0
;
Top
:
0
;
Right
:
0
;
Bottom
:
0
)
;
FullScreen
:
Boolean
=
False
;
begin
FullScreen
:
=
not
FullScreen
;
If
FullScreen
Then
Begin
Rect
:
=
BoundsRect
;
SetBounds
(
Left
-
ClientOrigin
.
X
,
Top
-
ClientOrigin
.
Y
,
GetDeviceCaps
(
Canvas
.
handle
,
HORZRES
)
+
(
screen
.
Width
-
ClientWidth
)
,
GetDeviceCaps
(
Canvas
.
handle
,
VERTRES
)
+
(
screen
.
Height
-
ClientHeight
)
)
;
SetWindowPos
(
Handle
,
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NoMove
or
SWP_NoSize
)
;
End
Else
begin
SetWindowPos
(
Handle
,
HWND_NOTOPMOST
,
0
,
0
,
0
,
0
,
SWP_NoMove
or
SWP_NoSize
)
;
BoundsRect
:
=
Rect
;
end
;
end
;
«
Last Edit: September 23, 2023, 07:32:47 pm by Pe3s
»
Logged
Josh
Hero Member
Posts: 1194
Re: Fullscreen
«
Reply #1 on:
September 22, 2023, 12:50:20 pm »
not tried or tested, but have you seen the wiki
https://wiki.lazarus.freepascal.org/Application_full_screen_mode
Logged
The best way to get accurate information on the forum is to post something wrong and wait for corrections.
Pe3s
Hero Member
Posts: 515
Re: Fullscreen
«
Reply #2 on:
September 22, 2023, 01:19:55 pm »
@Josh, I've read the wiki, the problem is that I can't use WindowState or border style
Logged
Pe3s
Hero Member
Posts: 515
Re: Fullscreen
«
Reply #3 on:
September 23, 2023, 07:32:33 pm »
Thank you
Logged
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
LCL
»
[SOLVED] Fullscreen
TinyPortal
© 2005-2018