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
Classic objects — does FP...
by
Thaddy
[
Today
at 05:15:51 pm]
SAVE StringGrid to PDF
by
cdbc
[
Today
at 05:06:00 pm]
Q: Debug a plugin DLL: 'h...
by
d7_2_laz
[
Today
at 05:04:36 pm]
Who catches the Linux sig...
by
MarkMLl
[
Today
at 04:43:45 pm]
Unwanted additional line ...
by
cdbc
[
Today
at 04:32:57 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]
What is the history of di...
by
marcov
[
Today
at 02:41:25 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]
Interesting article about...
by
440bx
[
Today
at 01:14:25 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]
fphttpclient https/tls on...
by
fireboxsoft
[
Today
at 12:38:12 am]
The Silver Coder on YouTu...
by
silvercoder70
[December 12, 2024, 11:42:06 pm]
[Solved] Crosshair error ...
by
wp
[December 12, 2024, 10:45:16 pm]
Datatypes Interoperabilit...
by
BSaidus
[December 12, 2024, 09:36:52 pm]
Component Installation
by
msch
[December 12, 2024, 09:31:43 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1010 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