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
can't determine which ove...
by
Madoc
[
Today
at 07:25:46 pm]
[Semi-Resolved] BGRASprit...
by
pixelink
[
Today
at 07:21:22 pm]
GetFTime. What is correct...
by
Hartmut
[
Today
at 07:17:52 pm]
ANN: Native X.509, RSA an...
by
Zoran
[
Today
at 07:16:52 pm]
LAMW 0.8.6.3
by
WayneSherman
[
Today
at 07:06:44 pm]
[SOLVED] SVG thumbnails
by
Pe3s
[
Today
at 07:06:40 pm]
How to detect if an UTF8-...
by
Hartmut
[
Today
at 06:22:15 pm]
try except fails inside w...
by
ad1mt
[
Today
at 05:41:53 pm]
Possible bug with range c...
by
Paolo
[
Today
at 05:38:23 pm]
Feedback on Int128 unit r...
by
ad1mt
[
Today
at 05:37:32 pm]
Problem with typing Shift...
by
AlexTP
[
Today
at 05:33:25 pm]
Open Source Program I hav...
by
vonskie
[
Today
at 05:20:58 pm]
Terminal shows warnings i...
by
zeljko
[
Today
at 05:12:52 pm]
Anyone use sqlcipher with...
by
vonskie
[
Today
at 05:09:57 pm]
Writing error when select...
by
TRon
[
Today
at 04:27:24 pm]
Inc operator overloading ...
by
jamie
[
Today
at 02:53:46 pm]
Compile loongarch64 appli...
by
myisjwj
[
Today
at 02:12:01 pm]
Display Software License ...
by
1HuntnMan
[
Today
at 01:46:01 pm]
Help shortcut disappeared
by
apeoperaio
[
Today
at 12:50:32 pm]
Why does calling CheckSyn...
by
a8265348
[
Today
at 12:13:11 pm]
Demo example. How work wi...
by
ginoo
[
Today
at 10:58:08 am]
LAMW: Green dot always ap...
by
Daydreamer
[
Today
at 10:52:09 am]
SELECT - Criar sequencial...
by
Zvoni
[
Today
at 10:24:28 am]
likely/unlikely — will it...
by
marcov
[
Today
at 10:05:59 am]
Better Vectorcall Support
by
marcov
[
Today
at 09:39:31 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 606 times)
Pe3s
Hero Member
Posts: 531
[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: 1197
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: 531
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: 531
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