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
How to know when dragging...
by
jamie
[
Today
at 02:30:22 am]
Breakpoint dosn't work
by
Martin_fr
[
Today
at 12:43:37 am]
[SOLVED] Howto use a DEFI...
by
bytebites
[
Today
at 12:05:01 am]
Common File Dialogs Have ...
by
msintle
[
Today
at 12:04:48 am]
ZUGFeRD: Which PDF lib to...
by
mtrsoft
[December 05, 2024, 11:47:24 pm]
C operators and shift
by
Warfley
[December 05, 2024, 11:19:19 pm]
Map vs dataset
by
silvercoder70
[December 05, 2024, 10:51:10 pm]
Tmemo add char like typin...
by
ackarwow
[December 05, 2024, 10:47:59 pm]
Python4Lazarus Undefined ...
by
AlexTP
[December 05, 2024, 08:42:33 pm]
Inversive Geometry Curves...
by
Dzandaa
[December 05, 2024, 06:39:58 pm]
mxMarkEdit, a new visual ...
by
maxnd
[December 05, 2024, 06:08:17 pm]
kernel 6.8 and checking s...
by
MarkMLl
[December 05, 2024, 06:04:53 pm]
How much would it hamper ...
by
Martin_fr
[December 05, 2024, 05:01:02 pm]
Api/component pack for Ra...
by
MarkMLl
[December 05, 2024, 04:47:33 pm]
compiler messages suggest...
by
Thaddy
[December 05, 2024, 04:15:17 pm]
Wrong resolution of secon...
by
Apiglio
[December 05, 2024, 03:13:47 pm]
Benchmarks
by
Warfley
[December 05, 2024, 02:00:39 pm]
[Solved]I have created dl...
by
Packs
[December 05, 2024, 01:11:27 pm]
TLazSerial : serial port ...
by
tetrastes
[December 05, 2024, 12:26:29 pm]
Bright color
by
Warfley
[December 05, 2024, 10:29:06 am]
[Solved] pointer to out o...
by
440bx
[December 05, 2024, 12:51:22 am]
storing string
by
ASerge
[December 04, 2024, 11:06:57 pm]
Show Form at Top
by
n7800
[December 04, 2024, 10:16:21 pm]
Arrow keys in FV
by
HotShoe
[December 04, 2024, 10:04:56 pm]
"Active $IFDEF code" is r...
by
MarkMLl
[December 04, 2024, 09:49:15 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1000 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