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
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
Conscious Artificial Inte...
by
cpicanco
[
Today
at 01:18:43 am]
Autentication Oracle
by
TRon
[
Today
at 12:07:49 am]
How to convert Real to Bi...
by
ad1mt
[December 06, 2023, 11:24:07 pm]
Small Status Bar Demo
by
MonsterMaze
[December 06, 2023, 09:04:06 pm]
Unique Instance Terminate...
by
KodeZwerg
[December 06, 2023, 09:03:58 pm]
[SOLVED] TLabeledEdit.Edi...
by
dsiders
[December 06, 2023, 08:49:22 pm]
Lazarus Release Candidate...
by
dedrasta
[December 06, 2023, 07:21:58 pm]
Export Stringgrid to an x...
by
majid.ebru
[December 06, 2023, 07:14:01 pm]
[Solved] i can't inatall ...
by
majid.ebru
[December 06, 2023, 06:55:28 pm]
ControlsCodePage presents...
by
Gercino
[December 06, 2023, 06:20:40 pm]
TStringGrid with stretche...
by
wp
[December 06, 2023, 05:54:54 pm]
Mac OS 3.0RC2 throws __da...
by
sawtelle
[December 06, 2023, 05:10:57 pm]
Battery Operations
by
Hansaplast
[December 06, 2023, 04:26:54 pm]
CORDIC algorithms
by
Curt Carpenter
[December 06, 2023, 04:23:32 pm]
[SOLVED] How to stay in t...
by
Hartmut
[December 06, 2023, 04:14:16 pm]
Lazarus 3.9.9 Variable Wa...
by
Martin_fr
[December 06, 2023, 03:55:01 pm]
Linux snapshot zip files ...
by
TRon
[December 06, 2023, 03:30:03 pm]
Anyone interested in test...
by
Josh
[December 06, 2023, 02:09:03 pm]
New version of BGRABitmap
by
lainz
[December 06, 2023, 01:15:01 pm]
Automatize build system
by
Чебурашка
[December 06, 2023, 12:20:44 pm]
lazarus controlling compi...
by
Bart
[December 06, 2023, 11:33:03 am]
SVG thumbnails
by
domasz
[December 06, 2023, 11:18:31 am]
How to "create" a TFont a...
by
kwyan
[December 06, 2023, 04:29:00 am]
SOLVED How to get PRAGMA ...
by
JanRoza
[December 06, 2023, 01:36:33 am]
Component writing adding ...
by
andrew Bubble
[December 06, 2023, 12:01:02 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 549 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: 2142
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