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
Interesting article about...
by
Zvoni
[
Today
at 12:30:52 pm]
DBLookupListBox shows (ME...
by
Zvoni
[
Today
at 12:26:03 pm]
how to control the order ...
by
cdbc
[
Today
at 12:15:39 pm]
Online tutor using remote...
by
Handoko
[
Today
at 11:57:40 am]
Datatypes Interoperabilit...
by
CCRDude
[
Today
at 11:12:20 am]
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]
Wiki, a dead link in page...
by
d7_2_laz
[December 09, 2024, 10:53:21 pm]
MIDI commands
by
TRon
[December 09, 2024, 10:43:22 pm]
Who catches the Linux sig...
by
LV
[December 09, 2024, 09:47:15 pm]
FreePascal version of gcc...
by
PascalDragon
[December 09, 2024, 09:45:02 pm]
Lazarus for Windows on aa...
by
PascalDragon
[December 09, 2024, 09:21:38 pm]
SAVE StringGrid to PDF
by
dseligo
[December 09, 2024, 07:42:30 pm]
ColorDialog can have opti...
by
Bart
[December 09, 2024, 06:07:24 pm]
Hustle - A simple task ma...
by
BSaidus
[December 09, 2024, 04:58:15 pm]
Notepad++ plugin with doc...
by
d7_2_laz
[December 09, 2024, 04:07:14 pm]
TLazSerial : serial port ...
by
CM630
[December 09, 2024, 04:05:20 pm]
MainMenu: How to use the ...
by
madref
[December 09, 2024, 03:39:05 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: [SOLVED] Fullscreen (Read 1004 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