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
Anyone interested in test...
by
Thaddy
[
Today
at 02:44:32 pm]
Online Package Manager
by
d7_2_laz
[
Today
at 02:38:55 pm]
i can't inatall Dam dialo...
by
Thaddy
[
Today
at 02:38:15 pm]
https page download
by
Thaddy
[
Today
at 02:28:34 pm]
Unable to write "/usr/sha...
by
Thaddy
[
Today
at 02:26:11 pm]
virus with lazarus-3.0RC2...
by
Thaddy
[
Today
at 01:18:01 pm]
Flock of Birds
by
Dzandaa
[
Today
at 12:39:49 pm]
[SOLVED] TStringGrid.Colu...
by
wp
[
Today
at 11:03:07 am]
Advance Record operators ...
by
Thaddy
[
Today
at 07:51:12 am]
Installing Lazarus on a R...
by
dbannon
[
Today
at 06:45:40 am]
Lazarus Release Candidate...
by
dbannon
[
Today
at 06:20:20 am]
Un-register an LCL Compon...
by
dbannon
[
Today
at 06:07:39 am]
Creating a "compressed" s...
by
maurobio
[December 03, 2023, 11:19:01 pm]
Lazarus 3.9.9 Variable Wa...
by
Martin_fr
[December 03, 2023, 09:27:11 pm]
TCustomShellTreeView.GetF...
by
Alexx2000
[December 03, 2023, 07:22:01 pm]
Can TreeView Node Colours...
by
Bart
[December 03, 2023, 07:21:27 pm]
Two paintbox, how to set ...
by
krolikbest
[December 03, 2023, 06:38:39 pm]
Error: -macosx_version_mi...
by
Koenijn
[December 03, 2023, 06:03:37 pm]
[SOLVED] TPanel slider po...
by
Pe3s
[December 03, 2023, 05:46:45 pm]
Can I disable procedure '...
by
Hartmut
[December 03, 2023, 05:02:00 pm]
TAnchorDockPanel - Save a...
by
kapibara
[December 03, 2023, 04:44:58 pm]
Is there an indexable str...
by
jamie
[December 03, 2023, 04:16:54 pm]
[Solved] How to shuffle l...
by
Thaddy
[December 03, 2023, 02:24:10 pm]
Virtual Method
by
Mr.Madguy
[December 03, 2023, 01:13:41 pm]
Difference between TSpeed...
by
Zoran
[December 03, 2023, 12:44:57 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 569 times)
Pe3s
Hero Member
Posts: 525
[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: 525
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: 525
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