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
Conscious Artificial Inte...
by
cpicanco
[
Today
at 01:18:43 am]
Autentication Oracle
by
TRon
[
Today
at 12:07:49 am]
How to convert Real to Bi...
by
ad1mt
[December 06, 2023, 11:24:07 pm]
Small Status Bar Demo
by
MonsterMaze
[December 06, 2023, 09:04:06 pm]
Unique Instance Terminate...
by
KodeZwerg
[December 06, 2023, 09:03:58 pm]
[SOLVED] TLabeledEdit.Edi...
by
dsiders
[December 06, 2023, 08:49:22 pm]
Lazarus Release Candidate...
by
dedrasta
[December 06, 2023, 07:21:58 pm]
Export Stringgrid to an x...
by
majid.ebru
[December 06, 2023, 07:14:01 pm]
[Solved] i can't inatall ...
by
majid.ebru
[December 06, 2023, 06:55:28 pm]
ControlsCodePage presents...
by
Gercino
[December 06, 2023, 06:20:40 pm]
TStringGrid with stretche...
by
wp
[December 06, 2023, 05:54:54 pm]
Mac OS 3.0RC2 throws __da...
by
sawtelle
[December 06, 2023, 05:10:57 pm]
Battery Operations
by
Hansaplast
[December 06, 2023, 04:26:54 pm]
CORDIC algorithms
by
Curt Carpenter
[December 06, 2023, 04:23:32 pm]
[SOLVED] How to stay in t...
by
Hartmut
[December 06, 2023, 04:14:16 pm]
Lazarus 3.9.9 Variable Wa...
by
Martin_fr
[December 06, 2023, 03:55:01 pm]
Linux snapshot zip files ...
by
TRon
[December 06, 2023, 03:30:03 pm]
Anyone interested in test...
by
Josh
[December 06, 2023, 02:09:03 pm]
New version of BGRABitmap
by
lainz
[December 06, 2023, 01:15:01 pm]
Automatize build system
by
Чебурашка
[December 06, 2023, 12:20:44 pm]
lazarus controlling compi...
by
Bart
[December 06, 2023, 11:33:03 am]
SVG thumbnails
by
domasz
[December 06, 2023, 11:18:31 am]
How to "create" a TFont a...
by
kwyan
[December 06, 2023, 04:29:00 am]
SOLVED How to get PRAGMA ...
by
JanRoza
[December 06, 2023, 01:36:33 am]
Component writing adding ...
by
andrew Bubble
[December 06, 2023, 12:01:02 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 577 times)
Pe3s
Hero Member
Posts: 527
[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: 1196
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: 527
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: 527
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