Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
Dialogue FileOpen position chose
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
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
TLazSerial : serial port ...
by
bobihot
[
Today
at 01:29:42 pm]
connecting to mariadb
by
alanyoung
[
Today
at 01:27:11 pm]
How to get the standard m...
by
stem
[
Today
at 12:50:55 pm]
Lookup field: error list ...
by
BlueIcaro
[
Today
at 12:00:10 pm]
Anchoring controls with d...
by
jamie
[
Today
at 11:22:45 am]
TIBDataSet "Closing"? on ...
by
egsuh
[
Today
at 09:14:47 am]
Recompiled IDE with LCLRe...
by
AlexTP
[
Today
at 05:09:56 am]
Hashing pointers by using...
by
ALLIGATOR
[
Today
at 04:41:23 am]
exception external SIGSEG...
by
billjtx
[
Today
at 01:06:50 am]
Commerce website written ...
by
Joanna
[
Today
at 01:00:28 am]
So many "newbies"
by
Curt Carpenter
[
Today
at 12:40:11 am]
TaurusTLS 1.0.0.25 beta 2...
by
LeP
[December 12, 2025, 09:21:31 pm]
Single / Double / Float s...
by
tetrastes
[December 12, 2025, 09:10:39 pm]
Publish a LAMW app in F-d...
by
spacepascal
[December 12, 2025, 09:00:41 pm]
OS/2 Warp 4 problem with ...
by
PascalDragon
[December 12, 2025, 08:30:23 pm]
Introducing PasBuild 1.0....
by
PascalDragon
[December 12, 2025, 08:20:32 pm]
Convert string with Key-V...
by
Bart
[December 12, 2025, 07:28:04 pm]
The TChromeTabs component...
by
1-berto
[December 12, 2025, 07:02:28 pm]
Military Grade Directives
by
Warfley
[December 12, 2025, 05:44:12 pm]
How can I make a safe app...
by
marcov
[December 12, 2025, 02:58:10 pm]
fpsockets error: 10047
by
Warfley
[December 12, 2025, 01:32:51 pm]
FPC 3.2.4-rc1 available
by
marcov
[December 12, 2025, 10:47:38 am]
[SOLVED] Lazreport. Multi...
by
Petrus Vorster
[December 12, 2025, 09:27:32 am]
Has anyone installed TeeB...
by
egsuh
[December 12, 2025, 06:34:29 am]
[SOLVED] Program compiles...
by
Schmitty2005
[December 11, 2025, 07:35:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 1017 times)
marcio2003
Jr. Member
Posts: 69
Dialogue FileOpen position chose
«
on:
May 25, 2023, 11:02:40 am »
Hi,
How i can chose position to FileOpen dialogue on Windows 10 using Lazarus_2_0_10.
Always I want it positioned in desktop center.
Thanks.
Logged
Lazarus 2.0.10 Windows 10 64bits
ASerge
Hero Member
Posts: 2469
Re: Dialogue FileOpen position chose
«
Reply #1 on:
May 25, 2023, 06:33:08 pm »
Quote from: marcio2003 on May 25, 2023, 11:02:40 am
How i can chose position to FileOpen dialogue on Windows 10 using Lazarus_2_0_10.
Code: Pascal
[Select]
[+]
[-]
unit
Unit1
;
{$mode objfpc}{$H+}
interface
uses
Classes
,
SysUtils
,
Forms
,
Controls
,
Dialogs
,
StdCtrls
,
ExtCtrls
;
type
TForm1
=
class
(
TForm
)
Button1
:
TButton
;
OpenDialog1
:
TOpenDialog
;
Timer1
:
TTimer
;
procedure
Button1Click
(
Sender
:
TObject
)
;
procedure
FormCreate
(
Sender
:
TObject
)
;
procedure
Timer1Timer
(
Sender
:
TObject
)
;
private
public
end
;
var
Form1
:
TForm1
;
implementation
{$R *.lfm}
uses
Windows
;
procedure
TForm1
.
Button1Click
(
Sender
:
TObject
)
;
begin
Timer1
.
Enabled
:
=
True
;
OpenDialog1
.
Execute
;
end
;
procedure
TForm1
.
FormCreate
(
Sender
:
TObject
)
;
begin
Timer1
.
Enabled
:
=
False
;
Timer1
.
Interval
:
=
50
;
end
;
procedure
TForm1
.
Timer1Timer
(
Sender
:
TObject
)
;
const
CDialogClass
=
'#32770'
;
var
Wnd
:
HWND
;
begin
Wnd
:
=
FindWindow
(
CDialogClass
,
nil
)
;
if
(
Wnd <>
0
)
and
IsWindowVisible
(
Wnd
)
then
begin
Timer1
.
Enabled
:
=
False
;
SetWindowPos
(
Wnd
,
0
,
33
,
33
,
0
,
0
,
SWP_NOSIZE
)
;
end
;
end
;
end
.
Logged
marcio2003
Jr. Member
Posts: 69
Re: Dialogue FileOpen position chose
«
Reply #2 on:
May 29, 2023, 12:23:17 pm »
Hi,
Thank you for your tips!
I'll try to use them to solve my problems.
Logged
Lazarus 2.0.10 Windows 10 64bits
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
Dialogue FileOpen position chose
TinyPortal
© 2005-2018