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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TvsComPort on MacOS Sierr...
by
Dzandaa
[
Today
at 03:13:38 pm]
Interaction dbnavigator r...
by
calm_sea
[
Today
at 03:08:52 pm]
Bug in string concatenati...
by
tetrastes
[
Today
at 02:50:27 pm]
Interesting article about...
by
Joanna from IRC
[
Today
at 02:27:57 pm]
lazarus 4.0 RC1 error
by
fcu
[
Today
at 01:54:05 pm]
Online tutor using remote...
by
marcov
[
Today
at 10:21:25 am]
had a question and found ...
by
MarkMLl
[
Today
at 09:14:59 am]
Starting a program with h...
by
jeremiah
[
Today
at 02:32:28 am]
Adlib Player
by
Gigatron
[
Today
at 01:57:12 am]
Is it possible to do git ...
by
Warfley
[
Today
at 12:38:51 am]
MQTT devices for Home Ass...
by
nicolap
[
Today
at 12:37:19 am]
Draw Transparent Fill Rec...
by
lainz
[
Today
at 12:16:54 am]
I have created dll in gol...
by
Packs
[December 11, 2024, 11:14:14 pm]
[Solved] Crosshair error ...
by
wp
[December 11, 2024, 10:39:23 pm]
Adding interfaces to any ...
by
lainz
[December 11, 2024, 10:29:51 pm]
Anyone doing Advent of Co...
by
therealhades
[December 11, 2024, 09:47:15 pm]
2048 game
by
Chronos
[December 11, 2024, 07:40:27 pm]
FPC port to 9front
by
marcov
[December 11, 2024, 07:27:07 pm]
Fatal: (10022) Can't find...
by
emersonline
[December 11, 2024, 07:25:37 pm]
[SOLVED] How to save a Gr...
by
Hartmut
[December 11, 2024, 05:17:16 pm]
Controlled Folder Access
by
Igor Kokarev
[December 11, 2024, 04:12:30 pm]
Serial Port using tvsComP...
by
Dzandaa
[December 11, 2024, 03:44:02 pm]
Stdout from program
by
Gyuri
[December 11, 2024, 03:16:13 pm]
Common File Dialogs Have ...
by
rvk
[December 11, 2024, 01:50:24 pm]
MainMenu: How to use the ...
by
madref
[December 11, 2024, 11:15:54 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1009 times)
Pe3s
Hero Member
Posts: 573
[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: 1344
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: 573
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: 573
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