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
Random errors in TensorFl...
by
jollytall
[
Today
at 10:14:30 pm]
Online tutor using remote...
by
silvercoder70
[
Today
at 10:04:11 pm]
how to control the order ...
by
mas steindorff
[
Today
at 08:47:04 pm]
Wiki, a dead link in page...
by
d7_2_laz
[
Today
at 08:42:35 pm]
DBLookupListBox shows (ME...
by
heebiejeebies
[
Today
at 08:12:05 pm]
How to save a Graphic fro...
by
jeremiah
[
Today
at 08:11:54 pm]
Interesting article about...
by
Curt Carpenter
[
Today
at 08:05:02 pm]
Crosshair error when chan...
by
Marq01
[
Today
at 08:02:17 pm]
Adding interfaces to any ...
by
Thaddy
[
Today
at 07:32:56 pm]
AVRPascal – free code edi...
by
ackarwow
[
Today
at 04:57:47 pm]
MainMenu: How to use the ...
by
madref
[
Today
at 04:19:32 pm]
SAVE StringGrid to PDF
by
dseligo
[
Today
at 04:13:22 pm]
I need advice for a new c...
by
wp
[
Today
at 03:18:11 pm]
Controlled Folder Access
by
Igor Kokarev
[
Today
at 02:17:46 pm]
Datatypes Interoperabilit...
by
silvercoder70
[
Today
at 01:32:48 pm]
Notepad++ plugin with doc...
by
d7_2_laz
[
Today
at 01:11:52 pm]
ZDataset.Locate + loParti...
by
silvercoder70
[
Today
at 10:49:08 am]
SQLite3 Date Problem
by
silvercoder70
[
Today
at 10:08:07 am]
Record "inheritance"/stru...
by
Thaddy
[
Today
at 09:54:38 am]
D2Bridge Framework for La...
by
egsuh
[
Today
at 04:48:02 am]
Application deployment
by
cousinp
[
Today
at 04:28:36 am]
[SOLVED] FPSpreadSheet, ...
by
TRon
[
Today
at 01:25:51 am]
Is it possible to do git ...
by
TRon
[
Today
at 12:41:39 am]
had a question and found ...
by
TRon
[
Today
at 12:36:57 am]
Draw Transparent Fill Rec...
by
LBox
[
Today
at 12:00:51 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1005 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