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
Windows API and wide/unic...
by
Nadar
[
Today
at 02:57:28 am]
Any library to generate a...
by
Martin_fr
[
Today
at 01:29:56 am]
Sleep forever
by
440bx
[
Today
at 01:12:57 am]
Absolute positioning of c...
by
dseligo
[
Today
at 01:06:11 am]
Lazarus 3.0 on linux does...
by
dbannon
[
Today
at 12:46:02 am]
BGRA Controls
by
andrew Bubble
[November 29, 2023, 11:44:33 pm]
Online Package Manager
by
lainz
[November 29, 2023, 10:34:18 pm]
how to change color of a ...
by
Ten_Mile_Hike
[November 29, 2023, 09:37:04 pm]
BGRA Controls Install Lat...
by
andrew Bubble
[November 29, 2023, 08:43:54 pm]
Date-Stamp DBDateEdit
by
1HuntnMan
[November 29, 2023, 08:35:55 pm]
What is the meaning of TF...
by
Hartmut
[November 29, 2023, 05:35:18 pm]
ImGui FreePascal Binding ...
by
Coldzer0
[November 29, 2023, 05:28:50 pm]
Can't build a project gro...
by
MarkMLl
[November 29, 2023, 05:22:14 pm]
TFileStream.ReadAnsiStrin...
by
simone
[November 29, 2023, 05:16:57 pm]
Why cannot this be inline...
by
Stefan Glienke
[November 29, 2023, 05:05:12 pm]
TPath enhancements (Issue...
by
VisualLab
[November 29, 2023, 04:47:46 pm]
jwabcrypt unit is missing
by
fpc_2024
[November 29, 2023, 03:08:24 pm]
Problems with accentuatio...
by
Gercino
[November 29, 2023, 02:47:54 pm]
Lazarus Install PI5 Bookw...
by
paweld
[November 29, 2023, 01:36:00 pm]
Conscious Artificial Inte...
by
Dzandaa
[November 29, 2023, 01:07:14 pm]
BGRABitmap - showcase -
by
Mongkey
[November 29, 2023, 11:14:36 am]
Patt - a small ball bounc...
by
thehay95
[November 29, 2023, 11:06:17 am]
Huge problem with open fi...
by
dseligo
[November 29, 2023, 10:09:29 am]
[SOLVED] TPanel slider po...
by
Thaddy
[November 29, 2023, 09:21:09 am]
Lazarus corrupted my enti...
by
Martin_fr
[November 29, 2023, 08:50:09 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 530 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: 2140
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