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
Bizarre SQLite error
by
heebiejeebies
[
Today
at 09:44:28 pm]
What is the history of di...
by
marcov
[
Today
at 09:40:19 pm]
Unwanted additional line ...
by
Ten_Mile_Hike
[
Today
at 09:34:47 pm]
Q: Debug a plugin DLL - c...
by
Martin_fr
[
Today
at 09:34:09 pm]
Interesting article about...
by
VisualLab
[
Today
at 09:28:26 pm]
fpweb documentation do no...
by
Sniper
[
Today
at 09:02:16 pm]
Managed pointers
by
jksmithiii
[
Today
at 08:42:29 pm]
Classic objects — does FP...
by
flowCRANE
[
Today
at 08:12:59 pm]
How to copy file to web
by
bobonwhidbey
[
Today
at 08:10:27 pm]
[Solved] Debug a plugin D...
by
d7_2_laz
[
Today
at 05:27:48 pm]
SAVE StringGrid to PDF
by
seghele0
[
Today
at 05:19:19 pm]
Who catches the Linux sig...
by
MarkMLl
[
Today
at 04:43:45 pm]
TvsComPort on MacOS Sierr...
by
Dzandaa
[
Today
at 04:23:21 pm]
Starting a program with h...
by
Hartmut
[
Today
at 04:07:52 pm]
Adding interfaces to any ...
by
Warfley
[
Today
at 03:48:44 pm]
Animated GIF's and Lazaru...
by
lainz
[
Today
at 03:11:11 pm]
[SOLVED] TRichMemo and te...
by
MarkMLl
[
Today
at 01:56:57 pm]
How to display empty stri...
by
krzynio
[
Today
at 01:55:38 pm]
crash db navigator with L...
by
calm_sea
[
Today
at 01:45:38 pm]
Common File Dialogs Have ...
by
zeljko
[
Today
at 01:05:36 pm]
Dymo label writers
by
MarkMLl
[
Today
at 11:25:25 am]
Application deployment
by
Warfley
[
Today
at 10:30:39 am]
Bug in string concatenati...
by
Remy Lebeau
[
Today
at 06:33:49 am]
Any support for Perpendic...
by
SandyG
[
Today
at 05:34:10 am]
uMain.pas(150,29) Error: ...
by
dseligo
[
Today
at 01:53:00 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1011 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