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
Sleep forever
by
jollytall
[
Today
at 11:43:50 am]
Is Lazarus IDE a viable c...
by
pyeri
[
Today
at 11:22:57 am]
Does anybody have example...
by
Hartmut
[
Today
at 11:10:00 am]
TPanel slider position
by
Pe3s
[
Today
at 11:09:59 am]
How to "create" a TFont a...
by
Josh
[
Today
at 10:59:21 am]
Does using TTimer creates...
by
EganSolo
[
Today
at 10:58:42 am]
Diferences in Generics in...
by
marcov
[
Today
at 10:12:34 am]
Lazarus IDE Windows "stuc...
by
nouzi
[
Today
at 09:39:11 am]
Huge problem with open fi...
by
dseligo
[
Today
at 09:13:25 am]
Store string in flash mem...
by
MarkMLl
[
Today
at 09:12:41 am]
Projects written in old F...
by
cdbc
[
Today
at 07:50:38 am]
LAMW: Print to network pr...
by
loaded
[
Today
at 07:15:30 am]
Lazarus Release Candidate...
by
dbannon
[
Today
at 06:20:12 am]
Why cannot this be inline...
by
Martin_fr
[
Today
at 02:10:55 am]
Android Auto app with LAM...
by
dsiders
[November 27, 2023, 11:32:10 pm]
Adding an icon to the exe...
by
hukka
[November 27, 2023, 09:06:26 pm]
Copy file with progress b...
by
Diverod
[November 27, 2023, 07:33:57 pm]
CopyToClipboard not worki...
by
dvhx
[November 27, 2023, 06:22:57 pm]
Dump list to tree view
by
d7_2_laz
[November 27, 2023, 06:02:14 pm]
Can we use custom drawn L...
by
bobby100
[November 27, 2023, 05:07:37 pm]
Windows low-level APIs an...
by
ArminLinder
[November 27, 2023, 04:32:19 pm]
Conscious Artificial Inte...
by
Dzandaa
[November 27, 2023, 03:50:13 pm]
How to override the capti...
by
wp
[November 27, 2023, 03:38:48 pm]
BGRABitmap - showcase -
by
Mongkey
[November 27, 2023, 11:20:36 am]
New version of BGRABitmap
by
nouzi
[November 27, 2023, 11:05:52 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 550 times)
Pe3s
Hero Member
Posts: 512
[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: 1188
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: 512
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: 512
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