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
C operators and shift
by
alpine
[
Today
at 10:32:13 am]
Show Form at Top
by
CCRDude
[
Today
at 10:09:34 am]
Type Library Viewer, Impo...
by
marcov
[
Today
at 09:47:07 am]
Developing a Kernel Modul...
by
MarkMLl
[
Today
at 09:28:16 am]
ZDataset.Locate + loParti...
by
tintinux
[
Today
at 09:14:48 am]
Problem with Hints
by
Alexandr R
[
Today
at 08:20:29 am]
Storing line colors
by
Khrys
[
Today
at 07:51:29 am]
Use tts0, This example is...
by
Thaddy
[
Today
at 06:28:12 am]
Python4Lazarus Undefined ...
by
Jurassic Pork
[
Today
at 02:07:28 am]
Zaos Transliteration on l...
by
hamacker
[December 03, 2024, 11:12:53 pm]
Breakpoint dosn't work
by
Joanna from IRC
[December 03, 2024, 11:04:55 pm]
[SOLVED] Howto use a DEFI...
by
PascalDragon
[December 03, 2024, 09:42:38 pm]
Random SnowFlakes:
by
Boleeman
[December 03, 2024, 09:07:14 pm]
AVRPascal – free code edi...
by
ackarwow
[December 03, 2024, 09:04:00 pm]
Secondary Installation fo...
by
TRon
[December 03, 2024, 08:21:03 pm]
Error when attempting to ...
by
dsiders
[December 03, 2024, 08:01:39 pm]
The Form cannot be resize...
by
daxnet
[December 03, 2024, 02:51:42 pm]
Api/component pack for Ra...
by
MarkMLl
[December 03, 2024, 02:15:57 pm]
kernel 6.8 and checking s...
by
MarkMLl
[December 03, 2024, 02:13:41 pm]
storing string
by
Thaddy
[December 03, 2024, 09:38:41 am]
OverLapping Snowflake Fra...
by
Boleeman
[December 03, 2024, 09:04:01 am]
[SOLVED] StringGrid color...
by
Vodnik
[December 03, 2024, 08:26:44 am]
YM Player
by
TRon
[December 03, 2024, 02:32:16 am]
How single procedure ends...
by
Marion
[December 03, 2024, 01:57:43 am]
ct2laz - convertor betwee...
by
Sharfik
[December 03, 2024, 01:26:03 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 763 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: 2336
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