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
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Various Variant Arrays
by
egsuh
[
Today
at 10:37:31 am]
Windows API Hooking/DLL I...
by
tooknox
[
Today
at 10:08:16 am]
SpreadSheet Add Chart Lin...
by
wp
[
Today
at 09:53:55 am]
Can /my/ AI help me with ...
by
440bx
[
Today
at 09:30:18 am]
How do 'with' statements ...
by
Thaddy
[
Today
at 09:02:30 am]
Linux Laz Packages have i...
by
valdir.marcos
[
Today
at 08:44:32 am]
FPC Unleashed (inline var...
by
440bx
[
Today
at 08:33:41 am]
[SOLVED] Is there a limit...
by
Khrys
[
Today
at 08:14:40 am]
Scripts to generate ofici...
by
valdir.marcos
[
Today
at 07:47:57 am]
Nothing but chaotic attem...
by
valdir.marcos
[
Today
at 07:29:29 am]
FPC Git main: bug, which ...
by
AlexTP
[
Today
at 01:16:59 am]
myrelease-20260508-1 A sc...
by
gasensor
[May 07, 2026, 09:43:04 pm]
P.I.S.S. a PlugIn-framewo...
by
cdbc
[May 07, 2026, 08:49:26 pm]
Gtk3 widgetset - call for...
by
valdir.marcos
[May 07, 2026, 07:58:07 pm]
Does this work in winders...
by
cdbc
[May 07, 2026, 07:09:57 pm]
Anubis activated
by
rvk
[May 07, 2026, 06:37:29 pm]
SDL2 GUI
by
fcu
[May 07, 2026, 06:36:49 pm]
TR-DOS Audio Suite
by
Datalore
[May 07, 2026, 06:32:24 pm]
Feature announcement: Fun...
by
Thaddy
[May 07, 2026, 04:19:10 pm]
[solved] stack overflow e...
by
GannonRidge
[May 07, 2026, 02:35:22 pm]
Is this correct initializ...
by
cdbc
[May 07, 2026, 02:17:04 pm]
Floating Point Utility
by
schuler
[May 07, 2026, 11:17:18 am]
Local AI LLM Wrapper Demo...
by
schuler
[May 07, 2026, 10:37:45 am]
Lazarus forum incompatibl...
by
Datalore
[May 07, 2026, 12:10:03 am]
overloading issues fpc3.2...
by
jamie
[May 06, 2026, 11:34:32 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 1102 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: 2492
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