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
I have created dll in gol...
by
Packs
[
Today
at 11:14:14 pm]
Draw Transparent Fill Rec...
by
LBox
[
Today
at 10:41:23 pm]
[Solved] Crosshair error ...
by
wp
[
Today
at 10:39:23 pm]
Bug in string concatenati...
by
tetrastes
[
Today
at 10:34:58 pm]
had a question and found ...
by
Wesbat
[
Today
at 10:30:22 pm]
Adding interfaces to any ...
by
lainz
[
Today
at 10:29:51 pm]
Anyone doing Advent of Co...
by
therealhades
[
Today
at 09:47:15 pm]
2048 game
by
Chronos
[
Today
at 07:40:27 pm]
FPC port to 9front
by
marcov
[
Today
at 07:27:07 pm]
Fatal: (10022) Can't find...
by
emersonline
[
Today
at 07:25:37 pm]
Interesting article about...
by
LV
[
Today
at 07:04:26 pm]
[SOLVED] How to save a Gr...
by
Hartmut
[
Today
at 05:17:16 pm]
Starting a program with h...
by
Hartmut
[
Today
at 05:14:42 pm]
Controlled Folder Access
by
Igor Kokarev
[
Today
at 04:12:30 pm]
Serial Port using tvsComP...
by
Dzandaa
[
Today
at 03:44:02 pm]
Stdout from program
by
Gyuri
[
Today
at 03:16:13 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 01:50:24 pm]
MainMenu: How to use the ...
by
madref
[
Today
at 11:15:54 am]
[Solved!] DBLookupListBox...
by
heebiejeebies
[
Today
at 09:27:03 am]
The Silver Coder on YouTu...
by
silvercoder70
[
Today
at 08:48:41 am]
Random errors in TensorFl...
by
jollytall
[
Today
at 08:29:13 am]
SAVE StringGrid to PDF
by
dseligo
[
Today
at 02:40:40 am]
Online tutor using remote...
by
silvercoder70
[December 10, 2024, 10:04:11 pm]
[solved] how to control t...
by
mas steindorff
[December 10, 2024, 08:47:04 pm]
Wiki, a dead link in page...
by
d7_2_laz
[December 10, 2024, 08:42:35 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1008 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