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
IRC channel
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
Building static libraries...
by
Fibonacci
[
Today
at 04:15:55 am]
failed to create named pi...
by
lazpas
[
Today
at 03:55:34 am]
Web assembly in Lazarus
by
PierceNg
[
Today
at 02:54:17 am]
TScroollBar vs TControlSc...
by
jamie
[
Today
at 12:26:23 am]
Online Package Manager
by
Beazy
[October 03, 2023, 11:22:22 pm]
Tmenuitem of TpopopMenu
by
paweld
[October 03, 2023, 11:06:26 pm]
Poor optimization of cons...
by
440bx
[October 03, 2023, 11:00:18 pm]
fpsStreams unit problems
by
wp
[October 03, 2023, 10:44:02 pm]
Disable sse/avx
by
marcov
[October 03, 2023, 10:43:02 pm]
Component for generating ...
by
colo
[October 03, 2023, 08:58:24 pm]
Screen.Cursor does not wo...
by
davemoriupak
[October 03, 2023, 08:24:27 pm]
LCLIntf.SetFocus don't ca...
by
davemoriupak
[October 03, 2023, 08:23:34 pm]
Linking error - Cocoa pro...
by
davemoriupak
[October 03, 2023, 08:21:48 pm]
Wayland and Free Pascal
by
nouzi
[October 03, 2023, 07:54:01 pm]
LAMW - opening URL in ext...
by
c4p
[October 03, 2023, 06:37:06 pm]
TBufferedFileStream crash...
by
AlexTP
[October 03, 2023, 06:13:54 pm]
Notarization under macOS ...
by
TRon
[October 03, 2023, 05:16:39 pm]
FPImageException while l...
by
wp
[October 03, 2023, 05:05:57 pm]
What is a .DB file
by
wp
[October 03, 2023, 04:13:15 pm]
IntraWeb in Lazarus??
by
ginoo
[October 03, 2023, 01:32:49 pm]
Pull an icon from a runni...
by
BIT
[October 03, 2023, 01:10:29 pm]
IMAP Search command & uni...
by
Rebell
[October 03, 2023, 12:24:14 pm]
[SOLVED] Debugger do not ...
by
BSaidus
[October 03, 2023, 10:04:29 am]
pgNotex, a document and t...
by
maxnd
[October 03, 2023, 09:45:57 am]
Improvement of function E...
by
AlexTP
[October 03, 2023, 09:30:23 am]
« previous
next »
Print
Pages: [
1
]
Author
Topic: Dialogue FileOpen position chose (Read 466 times)
marcio2003
Jr. Member
Posts: 68
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: 2106
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: 68
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