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
Array of String lookup gi...
by
TRon
[
Today
at 08:37:38 pm]
FPSpreadSheet, ReadAsText...
by
andresayang
[
Today
at 08:24:35 pm]
Lazarus for Windows on aa...
by
Alexx2000
[
Today
at 08:14:31 pm]
kernel 6.8 and checking s...
by
MarkMLl
[
Today
at 08:12:08 pm]
How to set the desktop co...
by
zxandris
[
Today
at 07:55:47 pm]
AVRPascal – free code edi...
by
ackarwow
[
Today
at 07:34:07 pm]
Api/component pack for Ra...
by
MarkMLl
[
Today
at 07:11:01 pm]
SAVE StringGrid to PDF
by
dseligo
[
Today
at 06:37:39 pm]
How to save a Graphic fro...
by
Hartmut
[
Today
at 05:57:03 pm]
Array of String lookup gi...
by
Wilko500
[
Today
at 05:47:16 pm]
ColorDialog can have opti...
by
AlexTP
[
Today
at 05:20:35 pm]
Developing a Kernel Modul...
by
Joanna from IRC
[
Today
at 04:35:26 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 04:29:02 pm]
Interesting article about...
by
cdbc
[
Today
at 03:18:36 pm]
How to get hash of entire...
by
Warfley
[
Today
at 01:30:18 pm]
IFS Fractals: Iterating t...
by
Dzandaa
[
Today
at 11:51:08 am]
Баги CYBERGRAPHICS AmigaO...
by
Smalovsky
[
Today
at 09:39:52 am]
C operators and shift
by
MarkMLl
[
Today
at 09:33:12 am]
fphttpapp and Windows Ser...
by
Thaddy
[
Today
at 08:36:36 am]
MIDI file generator - wor...
by
finlazarus
[
Today
at 02:49:40 am]
How do I use/call functio...
by
RedOctober
[
Today
at 02:43:07 am]
compiler messages suggest...
by
n7800
[
Today
at 02:35:05 am]
How to turn off Antialias...
by
n7800
[December 07, 2024, 05:30:19 pm]
Record "inheritance"/stru...
by
Thaddy
[December 07, 2024, 05:22:24 pm]
TFPHttpClient timeout err...
by
Leledumbo
[December 07, 2024, 04:56:00 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 766 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