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
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Problem with Qt5 on macOS
by
mischi
[
Today
at 07:44:29 pm]
Lowercase Drive in LAZ 4....
by
JuhaManninen
[
Today
at 07:34:56 pm]
New Mac mini M4 - FPC 3.2...
by
mischi
[
Today
at 07:30:38 pm]
Cross-platform rich text
by
lelanthran
[
Today
at 07:07:08 pm]
Draw Behind Desktop Icons...
by
jamie
[
Today
at 06:42:45 pm]
Add new unit to a Lazarus...
by
Lulu
[
Today
at 06:34:27 pm]
[SOLVED - Sort of!] Print...
by
AgriMensor
[
Today
at 06:27:08 pm]
SameGame
by
Guva
[
Today
at 06:19:18 pm]
Converting bitmaps into a...
by
wp
[
Today
at 06:00:12 pm]
Lazarus broke my project
by
jamie
[
Today
at 05:57:06 pm]
Access Violation
by
1HuntnMan
[
Today
at 04:48:40 pm]
Store directories and fil...
by
jamie
[
Today
at 03:44:08 pm]
Amigo programming languag...
by
paxscript
[
Today
at 02:35:23 pm]
Some testing the water qu...
by
mdlueck
[
Today
at 02:17:55 pm]
SandTris (Tetris variant)
by
Thaddy
[
Today
at 12:16:27 pm]
EditorMacroScript did not...
by
jamie
[
Today
at 12:11:50 pm]
Fpcupdeluxe
by
DonAlfredo
[
Today
at 10:39:15 am]
Get "serial number" of (r...
by
Thaddy
[
Today
at 09:25:53 am]
WaveFunction Collapse
by
Boleeman
[
Today
at 04:11:50 am]
Free Vision Build Failing...
by
swissbob
[November 15, 2025, 11:54:34 pm]
Programmatic filtering in...
by
jamie
[November 15, 2025, 08:05:46 pm]
How to hide IEEE754 limit...
by
srvaldez
[November 15, 2025, 07:42:38 pm]
This worries me about our...
by
Curt Carpenter
[November 15, 2025, 06:32:55 pm]
Porting PDF Viewer from D...
by
Boleeman
[November 15, 2025, 06:21:52 pm]
Form scaling aspect ratio
by
jamie
[November 15, 2025, 05:01:41 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1240 times)
Pe3s
Hero Member
Posts: 616
[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: 1425
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: 616
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: 616
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