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
Recent
SQLite3 Date Problem
by
Wesbat
[
Today
at 05:48:50 am]
kernel 6.8 and checking s...
by
robert rozee
[
Today
at 05:31:18 am]
storing string
by
Wesbat
[
Today
at 04:51:11 am]
How to know when dragging...
by
jamie
[
Today
at 02:30:22 am]
Breakpoint dosn't work
by
Martin_fr
[
Today
at 12:43:37 am]
[SOLVED] Howto use a DEFI...
by
bytebites
[
Today
at 12:05:01 am]
Common File Dialogs Have ...
by
msintle
[
Today
at 12:04:48 am]
ZUGFeRD: Which PDF lib to...
by
mtrsoft
[December 05, 2024, 11:47:24 pm]
C operators and shift
by
Warfley
[December 05, 2024, 11:19:19 pm]
Map vs dataset
by
silvercoder70
[December 05, 2024, 10:51:10 pm]
Tmemo add char like typin...
by
ackarwow
[December 05, 2024, 10:47:59 pm]
Python4Lazarus Undefined ...
by
AlexTP
[December 05, 2024, 08:42:33 pm]
Inversive Geometry Curves...
by
Dzandaa
[December 05, 2024, 06:39:58 pm]
mxMarkEdit, a new visual ...
by
maxnd
[December 05, 2024, 06:08:17 pm]
How much would it hamper ...
by
Martin_fr
[December 05, 2024, 05:01:02 pm]
Api/component pack for Ra...
by
MarkMLl
[December 05, 2024, 04:47:33 pm]
compiler messages suggest...
by
Thaddy
[December 05, 2024, 04:15:17 pm]
Wrong resolution of secon...
by
Apiglio
[December 05, 2024, 03:13:47 pm]
Benchmarks
by
Warfley
[December 05, 2024, 02:00:39 pm]
[Solved]I have created dl...
by
Packs
[December 05, 2024, 01:11:27 pm]
TLazSerial : serial port ...
by
tetrastes
[December 05, 2024, 12:26:29 pm]
Bright color
by
Warfley
[December 05, 2024, 10:29:06 am]
[Solved] pointer to out o...
by
440bx
[December 05, 2024, 12:51:22 am]
Show Form at Top
by
n7800
[December 04, 2024, 10:16:21 pm]
Arrow keys in FV
by
HotShoe
[December 04, 2024, 10:04:56 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 765 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: 2337
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