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
OnMouseDown - How catch g...
by
jamie
[
Today
at 02:07:29 pm]
Routine to array all fold...
by
jamie
[
Today
at 01:58:08 pm]
xlsreader package
by
ronhud
[
Today
at 01:39:13 pm]
COUNTIF is case sensitive...
by
fred
[
Today
at 01:33:38 pm]
Threads - stringlist and ...
by
Warfley
[
Today
at 12:37:31 pm]
Dialogue FileOpen positio...
by
marcio2003
[
Today
at 12:23:17 pm]
How to use customize outp...
by
Martin_fr
[
Today
at 11:22:53 am]
Dark mode in app - white ...
by
d7_2_laz
[
Today
at 11:19:18 am]
existing variables unavai...
by
Martin_fr
[
Today
at 11:16:57 am]
Tips for deep debuging of...
by
Martin_fr
[
Today
at 10:43:50 am]
Best way to delete an ins...
by
Чебурашка
[
Today
at 10:42:39 am]
Installing Lazarus on Lin...
by
fmarulaz
[
Today
at 09:35:00 am]
lhelp not working on Linu...
by
dbannon
[
Today
at 07:06:47 am]
help choosing laptop
by
Handoko
[
Today
at 04:56:38 am]
LAMW - simple esc/POS pri...
by
Mongkey
[
Today
at 04:11:12 am]
Bluetooth on Raspberry, d...
by
dbannon
[
Today
at 02:14:51 am]
[TLineSeries] Slow Prepar...
by
Martok
[
Today
at 01:11:28 am]
Fpcupdeluxe
by
Awkward
[May 28, 2023, 08:56:04 pm]
Are We Dead Yet?
by
jmpessoa
[May 28, 2023, 08:30:58 pm]
MemDataset validate not d...
by
eldonfsr
[May 28, 2023, 07:02:49 pm]
New version of BGRABitmap
by
circular
[May 28, 2023, 05:18:09 pm]
first generic attempt
by
Paolo
[May 28, 2023, 04:59:25 pm]
Online Package Manager
by
GetMem
[May 28, 2023, 03:54:17 pm]
Non-local goto example ne...
by
alpine
[May 28, 2023, 01:56:19 pm]
Can't load because <x> de...
by
marcov
[May 28, 2023, 01:23:43 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 287 times)
marcio2003
Jr. Member
Posts: 62
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: 2064
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: 62
Re: Dialogue FileOpen position chose
«
Reply #2 on:
Today
at 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