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
Open Source Program I hav...
by
KodeZwerg
[
Today
at 01:35:44 pm]
SVG thumbnails
by
Pe3s
[
Today
at 01:31:10 pm]
Writing error when select...
by
Rbart
[
Today
at 01:02:08 pm]
Help shortcut disappeared
by
apeoperaio
[
Today
at 12:50:32 pm]
LAMW 0.8.6.3
by
Insid3Code
[
Today
at 12:37:02 pm]
Why does calling CheckSyn...
by
a8265348
[
Today
at 12:13:11 pm]
Problem with typing Shift...
by
AlexTP
[
Today
at 11:28:02 am]
GetFTime. What is correct...
by
mika
[
Today
at 11:23:34 am]
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]
How to detect if an UTF8-...
by
Hartmut
[
Today
at 10:39:48 am]
SELECT - Criar sequencial...
by
Zvoni
[
Today
at 10:24:28 am]
Inc operator overloading ...
by
ad1mt
[
Today
at 10:06:42 am]
likely/unlikely — will it...
by
marcov
[
Today
at 10:05:59 am]
Better Vectorcall Support
by
marcov
[
Today
at 09:39:31 am]
lazarus controlling compi...
by
Чебурашка
[
Today
at 08:39:16 am]
Program crashes on Window...
by
avra
[
Today
at 07:22:42 am]
Compile loongarch64 appli...
by
myisjwj
[
Today
at 03:04:23 am]
Dynamical creation of obj...
by
jmpessoa
[December 10, 2023, 11:19:36 pm]
Possible bug with range c...
by
PascalDragon
[December 10, 2023, 09:46:00 pm]
Feature announcement: Fun...
by
PascalDragon
[December 10, 2023, 09:26:48 pm]
syncobjs.TEventObject cla...
by
PascalDragon
[December 10, 2023, 09:21:29 pm]
Stencil and TOpenGLContro...
by
Lulu
[December 10, 2023, 08:57:43 pm]
can't determine which ove...
by
ad1mt
[December 10, 2023, 06:34:17 pm]
ANN: Native X.509, RSA an...
by
abouchez
[December 10, 2023, 02:45:57 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 605 times)
Pe3s
Hero Member
Posts: 530
[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: 530
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: 530
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