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
Common File Dialogs Have ...
by
rvk
[
Today
at 10:30:04 pm]
[Solved] pointer to out o...
by
Joanna from IRC
[
Today
at 10:26:18 pm]
Benchmarks
by
alpine
[
Today
at 10:24:55 pm]
Bright color
by
wp
[
Today
at 10:24:04 pm]
Show Form at Top
by
n7800
[
Today
at 10:16:21 pm]
Arrow keys in FV
by
HotShoe
[
Today
at 10:04:56 pm]
"Active $IFDEF code" is r...
by
MarkMLl
[
Today
at 09:49:15 pm]
NSHapticFeedbackPerformer
by
msintle
[
Today
at 09:47:25 pm]
[SOLVED] Howto use a DEFI...
by
MarkMLl
[
Today
at 09:43:08 pm]
Use tts0, This example is...
by
coradi
[
Today
at 09:37:12 pm]
Library for XSLT 2.0 Tran...
by
ebizz
[
Today
at 06:54:35 pm]
How to know when dragging...
by
Aistis
[
Today
at 06:41:46 pm]
Problem with Hints
by
Handoko
[
Today
at 04:37:21 pm]
Breakpoint dosn't work
by
Martin_fr
[
Today
at 03:55:08 pm]
SetLength fall
by
LemonParty
[
Today
at 03:29:35 pm]
Feature Request for TMapV...
by
EkkehardDomning
[
Today
at 03:23:27 pm]
TLazSerial : serial port ...
by
tetrastes
[
Today
at 02:15:26 pm]
storing string
by
silvercoder70
[
Today
at 01:00:44 pm]
The Silver Coder on YouTu...
by
silvercoder70
[
Today
at 11:45:36 am]
Type Library Viewer, Impo...
by
korba812
[
Today
at 11:39:38 am]
Developing a Kernel Modul...
by
MarkMLl
[
Today
at 11:21:12 am]
C operators and shift
by
Thaddy
[
Today
at 10:45:03 am]
ZDataset.Locate + loParti...
by
tintinux
[
Today
at 09:14:48 am]
Storing line colors
by
Khrys
[
Today
at 07:51:29 am]
Python4Lazarus Undefined ...
by
Jurassic Pork
[
Today
at 02:07:28 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 995 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