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
Wikipedia pollution
by
Kays
[
Today
at 09:15:50 pm]
How to register a windows...
by
rca
[
Today
at 08:42:34 pm]
Dumb Problems Contest!
by
Curt Carpenter
[
Today
at 08:30:06 pm]
Corrupted strings
by
Aruna
[
Today
at 08:25:44 pm]
Convert string with Key-V...
by
Bart
[
Today
at 08:07:00 pm]
$ifdef highlighting
by
Thaddy
[
Today
at 07:26:54 pm]
Lazarus Trunc & macOS Tah...
by
Thaddy
[
Today
at 05:00:57 pm]
"F2": possible bug in IDE...
by
WooBean
[
Today
at 04:14:47 pm]
Please ask about the valu...
by
dseligo
[
Today
at 03:34:20 pm]
Need help converting a C+...
by
jamie
[
Today
at 03:18:52 pm]
TurboBird IBX
by
maurog
[
Today
at 02:56:32 pm]
Problem with TSQLQuery
by
sch61
[
Today
at 02:53:10 pm]
append new record to arra...
by
Warfley
[
Today
at 02:28:36 pm]
Lazarus broke my project
by
LatinoDaddy
[
Today
at 02:21:02 pm]
How to use nested classes
by
Thaddy
[
Today
at 02:03:44 pm]
Publish a LAMW app in F-d...
by
Joris
[
Today
at 01:49:23 pm]
Help with a TPages and TA...
by
AlexTP
[
Today
at 12:01:24 pm]
randomrange
by
BubikolRamios
[
Today
at 10:36:19 am]
Synedit wordwrap
by
Martin_fr
[
Today
at 09:42:04 am]
How to load read large CS...
by
Xenno
[
Today
at 05:43:10 am]
Uno, working demo (comput...
by
TBMan
[
Today
at 04:18:51 am]
[solved] fishing problem ...
by
speter
[
Today
at 03:36:39 am]
problen updating lazarus ...
by
LatinoDaddy
[
Today
at 02:48:20 am]
Need help with compiling ...
by
dbannon
[
Today
at 01:02:16 am]
Hints in TTrayIcon
by
dbannon
[
Today
at 12:44:28 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 1014 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: 2469
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