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
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
WIKI Timeout issues
Please read here if you have trouble connecting to the wiki
Recent
64 bits and PascalScript
by
maurog
[
Today
at 08:27:56 pm]
What is the current versi...
by
Thaddy
[
Today
at 07:41:28 pm]
gpio_set_irq_enabled_with...
by
Thaddy
[
Today
at 07:35:29 pm]
X11Libre, finally and for...
by
Fred vS
[
Today
at 06:49:23 pm]
functional IF
by
MarkMLl
[
Today
at 06:06:46 pm]
InstallAware 2025 Sources...
by
d2010
[
Today
at 05:39:29 pm]
A Challenge for Lazarus G...
by
MarkMLl
[
Today
at 05:38:11 pm]
SnapModbus
by
bobby100
[
Today
at 05:34:54 pm]
Has anyone loaded ReactOS...
by
MarkMLl
[
Today
at 05:24:35 pm]
TCustomGrid.OnPaint is us...
by
jamie
[
Today
at 05:19:53 pm]
32-Bit MS-DOS Application...
by
Thaddy
[
Today
at 04:57:40 pm]
Data\Watch Breakpoint by ...
by
zamtmn
[
Today
at 02:52:56 pm]
Silver Pascal Coder - Gre...
by
silvercoder70
[
Today
at 12:21:40 pm]
Copy to and from clipboar...
by
d2010
[
Today
at 11:34:52 am]
[SOLVED] TStringGrid.Visi...
by
EganSolo
[
Today
at 10:30:20 am]
Build failure
by
dbannon
[
Today
at 09:49:30 am]
How to run an external pr...
by
vsajip
[
Today
at 08:39:26 am]
FPReport designer, am I u...
by
mobilevil
[
Today
at 06:30:34 am]
Lazarus 4 - I give up and...
by
anthonyirwin82
[
Today
at 04:55:15 am]
Will pay for a solution
by
n7800
[
Today
at 04:51:00 am]
Fast Canvas Library V1.0
by
440bx
[
Today
at 04:00:56 am]
Which Linux version
by
dbannon
[
Today
at 03:51:54 am]
Nothing but chaotic attem...
by
dbannon
[
Today
at 03:19:47 am]
Free Pascal Database Serv...
by
nullpointer
[
Today
at 02:51:55 am]
Firebird 5.02. - the root...
by
egsuh
[
Today
at 02:25:38 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 914 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: 2416
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