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
TPanel slider position
by
Handoko
[
Today
at 07:50:21 pm]
unable to rebuild Lazarus
by
cdbc
[
Today
at 07:34:34 pm]
TStringGrid color cells w...
by
Hansvb
[
Today
at 07:16:36 pm]
How to force Event String...
by
Hartmut
[
Today
at 06:45:12 pm]
Mac OS 3.0RC2 throws __da...
by
Jonas Maebe
[
Today
at 05:26:39 pm]
i can't inatall Dam dialo...
by
majid.ebru
[
Today
at 05:00:57 pm]
Noting responds when send...
by
ccrause
[
Today
at 04:47:27 pm]
[SOLVED]Bash commands and...
by
johnathan
[
Today
at 04:46:02 pm]
Online Package Manager
by
lainz
[
Today
at 04:31:55 pm]
How to detect uninitialis...
by
jamie
[
Today
at 04:20:00 pm]
TCustomShellTreeView.GetF...
by
wp
[
Today
at 03:43:58 pm]
Gtk2 small patch for focu...
by
parcel
[
Today
at 03:32:44 pm]
Winsoft libraries
by
Mark20
[
Today
at 03:12:49 pm]
Not able to add any compo...
by
andrew Bubble
[
Today
at 02:46:49 pm]
[SOLVED] TFPHTTPClient.Ge...
by
Thaddy
[
Today
at 02:30:18 pm]
Fpcupdeluxe
by
fabiopesaju
[
Today
at 02:09:38 pm]
Can TreeView Node Colours...
by
wp
[
Today
at 01:23:19 pm]
GUI for ChatGPT (yarvis)
by
Dzandaa
[
Today
at 12:53:24 pm]
Un-register an LCL Compon...
by
JuhaManninen
[
Today
at 11:52:52 am]
SOCKETS fails sending or ...
by
dseligo
[
Today
at 10:46:10 am]
Lazarus Release Candidate...
by
rossh_lz
[
Today
at 10:19:26 am]
[SOLVED] Run time error 3...
by
Wings2018
[
Today
at 10:16:46 am]
fpconnect (from sockets u...
by
arturogr
[
Today
at 10:12:48 am]
TAnchorDockPanel - Save a...
by
zamtmn
[
Today
at 08:32:30 am]
Conscious Artificial Inte...
by
schuler
[
Today
at 07:34:31 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 562 times)
Pe3s
Hero Member
Posts: 516
[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: 516
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: 516
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