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
Adding interfaces to any ...
by
ASerge
[
Today
at 04:18:23 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]
How to save a Graphic fro...
by
wp
[
Today
at 03:04:58 pm]
Interesting article about...
by
lainz
[
Today
at 03:00:07 pm]
I have created dll in gol...
by
Packs
[
Today
at 02:28:50 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 01:50:24 pm]
Crosshair error when chan...
by
wp
[
Today
at 11:41:50 am]
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]
had a question and found ...
by
MarkMLl
[
Today
at 12:13: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]
AVRPascal – free code edi...
by
ackarwow
[December 10, 2024, 04:57:47 pm]
I need advice for a new c...
by
wp
[December 10, 2024, 03:18:11 pm]
Datatypes Interoperabilit...
by
silvercoder70
[December 10, 2024, 01:32:48 pm]
Notepad++ plugin with doc...
by
d7_2_laz
[December 10, 2024, 01:11:52 pm]
ZDataset.Locate + loParti...
by
silvercoder70
[December 10, 2024, 10:49:08 am]
SQLite3 Date Problem
by
silvercoder70
[December 10, 2024, 10:08:07 am]
Record "inheritance"/stru...
by
Thaddy
[December 10, 2024, 09:54:38 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1006 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