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
mvvm experimenting
by
cdbc
[
Today
at 10:10:43 am]
Mazemaker (efg)
by
Lulu
[
Today
at 09:57:03 am]
Strange behavior of TGrap...
by
simsee
[
Today
at 09:28:59 am]
[Discussion] Expanding wi...
by
MarkMLl
[
Today
at 09:07:46 am]
How I can validate if con...
by
MarkMLl
[
Today
at 09:01:07 am]
form transparency
by
GetMem
[
Today
at 08:05:18 am]
QRCode component
by
Pe3s
[
Today
at 07:42:30 am]
Hypocycloid demo
by
Boleeman
[
Today
at 04:16:06 am]
[SOLVED] Internationaliza...
by
Mongkey
[
Today
at 02:54:16 am]
reset
by
KodeZwerg
[
Today
at 01:03:17 am]
Switching IDE context for...
by
Martin_fr
[September 22, 2023, 11:02:13 pm]
Resize projectwizard dial...
by
wp
[September 22, 2023, 11:01:01 pm]
TListView vsIcon view sho...
by
wp
[September 22, 2023, 10:46:26 pm]
moving project, extending...
by
Weiss
[September 22, 2023, 10:28:52 pm]
LAMW - Getting text in jC...
by
c4p
[September 22, 2023, 10:19:52 pm]
[Solved] Cocoa window sho...
by
FangQ
[September 22, 2023, 08:39:17 pm]
Changing the superclass o...
by
alpine
[September 22, 2023, 07:59:48 pm]
static link libc.a
by
toby
[September 22, 2023, 06:28:35 pm]
Best practice to store lo...
by
Okoba
[September 22, 2023, 05:31:10 pm]
Circle with antialising f...
by
zeljko
[September 22, 2023, 05:21:03 pm]
LAMW - android logcat vie...
by
maurobio
[September 22, 2023, 01:54:22 pm]
Fullscreen
by
Pe3s
[September 22, 2023, 01:19:55 pm]
How To DragNDrop txt file...
by
Boleeman
[September 22, 2023, 01:19:44 pm]
PRNG: Why transition to X...
by
MarkMLl
[September 22, 2023, 12:06:10 pm]
Improvement of function E...
by
runewalsh
[September 22, 2023, 10:30:23 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 462 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