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 04:08:45 am]
Online Package Manager
by
Remy Lebeau
[
Today
at 04:00:20 am]
Is there an indexable str...
by
jamie
[
Today
at 03:44:14 am]
Un-register an LCL Compon...
by
dbannon
[
Today
at 03:28:20 am]
[SOLVED]Bash commands and...
by
TRon
[
Today
at 02:52:35 am]
TAnchorDockPanel - Save a...
by
kapibara
[
Today
at 01:35:51 am]
Error: -macosx_version_mi...
by
Koenijn
[
Today
at 01:28:52 am]
Interesting work on Unive...
by
WayneSherman
[
Today
at 12:58:30 am]
How to 'Hello world' on l...
by
wp
[
Today
at 12:44:08 am]
How to force Event String...
by
wp
[December 02, 2023, 11:19:09 pm]
Two paintbox, how to set ...
by
VisualLab
[December 02, 2023, 10:54:37 pm]
IsWayland value can be ca...
by
AlexTP
[December 02, 2023, 10:11:17 pm]
Rotate image
by
Onur2x
[December 02, 2023, 09:21:07 pm]
Date-Stamp DBDateEdit
by
1HuntnMan
[December 02, 2023, 09:01:03 pm]
unable to rebuild Lazarus
by
cdbc
[December 02, 2023, 07:34:34 pm]
TStringGrid color cells w...
by
Hansvb
[December 02, 2023, 07:16:36 pm]
Mac OS 3.0RC2 throws __da...
by
Jonas Maebe
[December 02, 2023, 05:26:39 pm]
i can't inatall Dam dialo...
by
majid.ebru
[December 02, 2023, 05:00:57 pm]
Noting responds when send...
by
ccrause
[December 02, 2023, 04:47:27 pm]
How to detect uninitialis...
by
jamie
[December 02, 2023, 04:20:00 pm]
TCustomShellTreeView.GetF...
by
wp
[December 02, 2023, 03:43:58 pm]
Gtk2 small patch for focu...
by
parcel
[December 02, 2023, 03:32:44 pm]
Winsoft libraries
by
Mark20
[December 02, 2023, 03:12:49 pm]
Not able to add any compo...
by
andrew Bubble
[December 02, 2023, 02:46:49 pm]
[SOLVED] TFPHTTPClient.Ge...
by
Thaddy
[December 02, 2023, 02:30:18 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 564 times)
Pe3s
Hero Member
Posts: 517
[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: 517
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: 517
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