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
kernel 6.8 and checking s...
by
robert rozee
[
Today
at 05:18:47 pm]
How much would it hamper ...
by
Martin_fr
[
Today
at 05:01:02 pm]
Api/component pack for Ra...
by
MarkMLl
[
Today
at 04:47:33 pm]
compiler messages suggest...
by
Thaddy
[
Today
at 04:15:17 pm]
Wrong resolution of secon...
by
Apiglio
[
Today
at 03:13:47 pm]
Benchmarks
by
Warfley
[
Today
at 02:00:39 pm]
Breakpoint dosn't work
by
Martin_fr
[
Today
at 01:13:30 pm]
[Solved]I have created dl...
by
Packs
[
Today
at 01:11:27 pm]
TLazSerial : serial port ...
by
tetrastes
[
Today
at 12:26:29 pm]
Common File Dialogs Have ...
by
rvk
[
Today
at 10:39:59 am]
Bright color
by
Warfley
[
Today
at 10:29:06 am]
Inversive Geometry Curves...
by
Boleeman
[
Today
at 09:18:47 am]
[Solved] pointer to out o...
by
440bx
[
Today
at 12:51:22 am]
storing string
by
ASerge
[December 04, 2024, 11:06:57 pm]
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]
"Active $IFDEF code" is r...
by
MarkMLl
[December 04, 2024, 09:49:15 pm]
NSHapticFeedbackPerformer
by
msintle
[December 04, 2024, 09:47:25 pm]
[SOLVED] Howto use a DEFI...
by
MarkMLl
[December 04, 2024, 09:43:08 pm]
Use tts0, This example is...
by
coradi
[December 04, 2024, 09:37:12 pm]
Library for XSLT 2.0 Tran...
by
ebizz
[December 04, 2024, 06:54:35 pm]
How to know when dragging...
by
Aistis
[December 04, 2024, 06:41:46 pm]
Problem with Hints
by
Handoko
[December 04, 2024, 04:37:21 pm]
SetLength fall
by
LemonParty
[December 04, 2024, 03:29:35 pm]
Feature Request for TMapV...
by
EkkehardDomning
[December 04, 2024, 03:23:27 pm]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 764 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