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
Circle with antialising f...
by
paweld
[
Today
at 03:08:34 pm]
Erro ao executar um métod...
by
wandrey
[
Today
at 02:45:12 pm]
reset
by
oproescu
[
Today
at 02:36:16 pm]
Create library, why not c...
by
DaveP
[
Today
at 02:25:58 pm]
Centralising code
by
vangli
[
Today
at 12:58:06 pm]
install on 13.5 problems ...
by
Martin_fr
[
Today
at 10:35:23 am]
Importing TLB File, missi...
by
Weitentaaal
[
Today
at 08:39:49 am]
Getting TCustomAttribute
by
Weitentaaal
[
Today
at 08:26:34 am]
Has anyone installed Laza...
by
zeljko
[
Today
at 08:26:23 am]
LAMW -robotium UI automat...
by
Mongkey
[
Today
at 02:55:29 am]
Trying to figure out LazD...
by
r.lukasiak
[
Today
at 01:49:43 am]
Raspberry Pi - rebuild ID...
by
Martin_fr
[
Today
at 01:17:33 am]
Custom PopUp Menu with Co...
by
Josh
[
Today
at 12:52:31 am]
form transparency
by
toby
[
Today
at 12:52:14 am]
RLE: Run Length Encode T...
by
KodeZwerg
[
Today
at 12:35:40 am]
Lazarus Release Candidate...
by
PeterBB
[September 20, 2023, 11:49:12 pm]
Custom PopUp Menu with Co...
by
Batz95
[September 20, 2023, 10:41:49 pm]
Mazemaker (efg)
by
Lulu
[September 20, 2023, 09:05:49 pm]
[SOLVED]TbufDataSet and s...
by
Zvoni
[September 20, 2023, 08:34:24 pm]
static link libc.a
by
toby
[September 20, 2023, 08:26:17 pm]
Cocoa window showmodal er...
by
FangQ
[September 20, 2023, 07:46:48 pm]
Tracking TChart cursor
by
wp
[September 20, 2023, 07:34:33 pm]
[Solved] Cocoa widgetset ...
by
FangQ
[September 20, 2023, 07:30:30 pm]
[SOLVED]DBGRID : How to t...
by
micoudic
[September 20, 2023, 06:45:27 pm]
[solved] Firebird: Copy t...
by
Nicole
[September 20, 2023, 06:26:39 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 459 times)
marcio2003
Jr. Member
Posts: 68
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: 2102
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: 68
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