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
Online Package Manager
by
paweld
[
Today
at 04:07:24 pm]
QT5 ide tooltips
by
ginoo
[
Today
at 04:06:56 pm]
How to stay in the invali...
by
Hartmut
[
Today
at 03:58:41 pm]
CORDIC algorithms
by
avra
[
Today
at 03:44:28 pm]
Anyone interested in test...
by
ad1mt
[
Today
at 03:23:58 pm]
How to convert Real to Bi...
by
ad1mt
[
Today
at 03:22:00 pm]
Compare strange character...
by
kwyan
[
Today
at 03:00:13 pm]
Flock of Birds (boids) Wi...
by
MarkMLl
[
Today
at 02:08:05 pm]
[SOLVED] TLabeledEdit.Edi...
by
wp
[
Today
at 01:39:17 pm]
[SOLVED]Bash commands and...
by
johnathan
[
Today
at 11:58:02 am]
[SOLVED] How to detect if...
by
Hartmut
[
Today
at 11:46:07 am]
TStringGrid with stretche...
by
wp
[
Today
at 11:42:30 am]
fpconnect (from sockets u...
by
MarkMLl
[
Today
at 10:49:53 am]
Feature announcement: Fun...
by
marcov
[
Today
at 10:36:25 am]
(new Topic) i can't inata...
by
majid.ebru
[
Today
at 10:14:40 am]
Form creator for editing ...
by
krzynio
[
Today
at 10:13:48 am]
i can't inatall Dam dialo...
by
majid.ebru
[
Today
at 10:12:23 am]
Windows. Status Drives Se...
by
Bart
[
Today
at 09:50:54 am]
Installing Lazarus on a R...
by
guachipelintree
[
Today
at 08:51:15 am]
Unique Instance Terminate...
by
Weitentaaal
[
Today
at 08:41:57 am]
Lazarus Release Candidate...
by
dbannon
[
Today
at 07:24:07 am]
License Agreement
by
RayoGlauco
[December 04, 2023, 11:33:44 pm]
How to print a DrawGrid
by
wp
[December 04, 2023, 11:29:20 pm]
virus with lazarus-3.0RC2...
by
rvk
[December 04, 2023, 11:11:01 pm]
https page download
by
BubikolRamios
[December 04, 2023, 04:11:51 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 573 times)
Pe3s
Hero Member
Posts: 525
[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: 1195
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: 525
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: 525
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