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
syncobjs.TEventObject cla...
by
AlexTP
[
Today
at 06:53:38 pm]
Program crashes on Window...
by
Thaddy
[
Today
at 06:52:08 pm]
Inc operator overloading ...
by
Thaddy
[
Today
at 06:49:31 pm]
can't determine which ove...
by
ad1mt
[
Today
at 06:34:17 pm]
Demo example. How work wi...
by
Renat.Su
[
Today
at 04:53:16 pm]
How to detect if an UTF8-...
by
Hartmut
[
Today
at 04:48:28 pm]
ANN: Native X.509, RSA an...
by
abouchez
[
Today
at 02:45:57 pm]
Problem with typing Shift...
by
Martin_fr
[
Today
at 01:58:18 pm]
RayLib 5.0
by
YiannisKam
[
Today
at 01:02:58 pm]
Feature announcement: Fun...
by
Zoran
[
Today
at 01:02:25 pm]
BGRA Controls
by
petevick
[
Today
at 12:08:48 pm]
Writing error when select...
by
Martin_fr
[
Today
at 11:49:41 am]
There is no iconv static ...
by
a8265348
[
Today
at 11:25:24 am]
Dynamical creation of obj...
by
maxerist
[
Today
at 11:17:54 am]
BGRABitmap - showcase -
by
circular
[
Today
at 11:09:24 am]
Stringgrid check only one...
by
Hansvb
[
Today
at 10:11:20 am]
BottomAxis Height
by
kapibara
[
Today
at 08:46:39 am]
AI cheetah
by
avra
[
Today
at 05:41:36 am]
LAMW 0.8.6.3
by
jmpessoa
[
Today
at 04:20:59 am]
SELECT - Criar sequencial...
by
CapitaoVirgulinoFerreira
[
Today
at 04:02:01 am]
Online Package Manager
by
dbannon
[
Today
at 12:43:21 am]
[Solved]Last page on Grid...
by
bobonwhidbey
[December 09, 2023, 11:58:42 pm]
likely/unlikely — will it...
by
furious programming
[December 09, 2023, 06:58:03 pm]
Fpcupdeluxe
by
fafafooey
[December 09, 2023, 06:22:39 pm]
Telegram bots API Wrapper
by
Renat.Su
[December 09, 2023, 05:18:43 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 603 times)
Pe3s
Hero Member
Posts: 528
[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: 1197
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: 528
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: 528
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