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
.cvd ClamAV database comp...
by
Turkeytmfounder
[
Today
at 09:16:31 am]
LAMW AppJCenterToyTimerSe...
by
Emmajulia
[
Today
at 09:11:14 am]
[SOLVED] LAMW BackButton ...
by
c4p
[
Today
at 08:33:39 am]
[SOLVED] Help for downloa...
by
Jurassic Pork
[
Today
at 07:42:55 am]
help choosing laptop
by
dbannon
[
Today
at 07:38:49 am]
general reference manual ...
by
GAN
[
Today
at 07:34:52 am]
any one knows how to set ...
by
greenzyzyzy
[
Today
at 06:51:53 am]
How can I capture all key...
by
Handoko
[
Today
at 05:21:56 am]
Are We Dead Yet?
by
dbannon
[
Today
at 03:33:02 am]
Changes in "Search Result...
by
n7800
[
Today
at 03:13:36 am]
TBufferDataSet List Index...
by
eldonfsr
[
Today
at 01:54:18 am]
How to download a file fr...
by
jmpessoa
[
Today
at 01:44:30 am]
Clean up at ide/include/i...
by
Bart
[June 03, 2023, 11:03:10 pm]
Tips for deep debuging of...
by
Grew
[June 03, 2023, 10:46:22 pm]
discarding an array
by
robert rozee
[June 03, 2023, 09:54:10 pm]
TSynEdit crashes when loa...
by
Martin_fr
[June 03, 2023, 09:37:47 pm]
How to create form in thr...
by
PascalDragon
[June 03, 2023, 07:22:32 pm]
Who uses "caret past EOL"...
by
Martin_fr
[June 03, 2023, 06:34:39 pm]
array of array of type?
by
jamie
[June 03, 2023, 04:42:22 pm]
if then else syntax
by
jamie
[June 03, 2023, 04:37:44 pm]
how to do a HTTP POST wit...
by
rvk
[June 03, 2023, 03:51:05 pm]
[SOLVED] SynEdit resize t...
by
Hansvb
[June 03, 2023, 03:42:16 pm]
Two issues related to fcl...
by
wp
[June 03, 2023, 11:07:07 am]
ANN: ODBC DAC under GNU G...
by
Andrey Zubik
[June 03, 2023, 01:14:38 am]
LAMW - (SOLVED) simple es...
by
Mongkey
[June 03, 2023, 12:20:54 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 374 times)
marcio2003
Jr. Member
Posts: 65
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: 2066
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: 65
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