[Solved] Limit on positioning Dialogs?

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

[Solved] Limit on positioning Dialogs?

Post by ocnuybear » Mon Sep 03, 2018 10:10 am

I have two identical FHD monitors with my main screen on the left, I'm trying to create a dialog on the second screen (right screen), but it can only move up till the end of the first screen and as soon as the Left X value is close to 1920, it jumps back to the start of the left screen, is there a limit on Position,poDesigned?

Code: Select all

Dialog>Dialog1
  object Dialog1: TForm
  end
EndDialog>Dialog1

SetDialogProperty>Dialog1,,Position,poDesigned
SetDialogProperty>Dialog1,,Left,1800
SetDialogProperty>Dialog1,,Top,100
SetDialogProperty>Dialog1,,clientheight,200
SetDialogProperty>Dialog1,,clientwidth,400

Show>Dialog1,r
Last edited by ocnuybear on Tue Sep 04, 2018 3:38 pm, edited 1 time in total.

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Limit on positioning Dialogs?

Post by ocnuybear » Tue Sep 04, 2018 8:31 am

Anyone else having this problem?

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Limit on positioning Dialogs?

Post by Marcus Tettmar » Tue Sep 04, 2018 3:20 pm

There's no limit, no, but perhaps Windows is repositioning it if it doesn't fit. You should be able to set an X,Y on the virtual desktop.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

ocnuybear
Pro Scripter
Posts: 100
Joined: Sun Jul 15, 2018 5:14 pm

Re: Limit on positioning Dialogs?

Post by ocnuybear » Tue Sep 04, 2018 3:38 pm

Important thing here is to use 'DefaultMonitor = dmDesktop' to make use of entire desktop space

Code: Select all

Dialog>Dialog1
object Dialog1: TForm
Left = 255
Top = 220
HelpContext = 5000
BorderIcons = [biSystemMenu]
Caption = 'CustomDialog'
ClientHeight = 162
ClientWidth = 1170
Color = clBtnFace
DefaultMonitor = dmDesktop
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
Font.Height = -28
Font.Name = 'MS Sans Serif'
Font.Style = []
OldCreateOrder = True
ShowHint = True
OnTaskBar = False
PixelsPerInch = 240
TextHeight = 32
end
EndDialog>Dialog1
SetDialogProperty>Dialog1,,Position,poDesigned
SetDialogProperty>Dialog1,,Left,1800
SetDialogProperty>Dialog1,,Top,100
SetDialogProperty>Dialog1,,clientheight,200
SetDialogProperty>Dialog1,,clientwidth,400
Show>Dialog1,r

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts