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
C operators and shift
by
dseligo
[
Today
at 01:58:46 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 12:49:07 pm]
Hustle - A simple task ma...
by
nomorelogic
[
Today
at 12:28:28 pm]
kernel 6.8 and checking s...
by
MarkMLl
[
Today
at 12:16:23 pm]
Python4Lazarus Undefined ...
by
Grew
[
Today
at 12:03:45 pm]
SQLite3 Date Problem
by
Zvoni
[
Today
at 11:54:12 am]
How to know when dragging...
by
Aistis
[
Today
at 09:40:34 am]
Inversive Geometry Curves...
by
Thaddy
[
Today
at 08:56:11 am]
ZUGFeRD: Which PDF lib to...
by
cdbc
[
Today
at 08:03:31 am]
Map vs dataset
by
cdbc
[
Today
at 07:46:53 am]
TTrayIcon do not work pro...
by
Thaddy
[
Today
at 07:36:19 am]
Undefined symbol: WSRegis...
by
ljz111
[
Today
at 07:19:58 am]
Arrow keys in FV
by
Thaddy
[
Today
at 06:33:08 am]
[SOLVED] How much would i...
by
egsuh
[
Today
at 06:15:02 am]
storing string
by
Wesbat
[
Today
at 04:51:11 am]
Breakpoint dosn't work
by
Martin_fr
[
Today
at 12:43:37 am]
[SOLVED] Howto use a DEFI...
by
bytebites
[
Today
at 12:05:01 am]
Tmemo add char like typin...
by
ackarwow
[December 05, 2024, 10:47:59 pm]
mxMarkEdit, a new visual ...
by
maxnd
[December 05, 2024, 06:08:17 pm]
Api/component pack for Ra...
by
MarkMLl
[December 05, 2024, 04:47:33 pm]
compiler messages suggest...
by
Thaddy
[December 05, 2024, 04:15:17 pm]
Wrong resolution of secon...
by
Apiglio
[December 05, 2024, 03:13:47 pm]
Benchmarks
by
Warfley
[December 05, 2024, 02:00:39 pm]
[Solved]I have created dl...
by
Packs
[December 05, 2024, 01:11:27 pm]
TLazSerial : serial port ...
by
tetrastes
[December 05, 2024, 12:26:29 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1001 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