OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: XDCAD on November 01, 2018, 02:49:29 AM

Title: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: XDCAD on November 01, 2018, 02:49:29 AM
Dcl-form-setpos has problems in 2K, 4K resolution

(dcl_Form_SetPos ctrl 1000 0)

The dialog box is displayed in the middle of the screen, and the screen resolution is 2560x1440.

=================================
(dcl_Form_SetPos ctrl 2000 0)

Shown outside the screen

Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: XDCAD on November 01, 2018, 02:51:09 AM
(dcl-form-setpos ctrl 1000 0)
Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: owenwengerd on November 01, 2018, 04:24:42 AM
Which version of OpenDCL? In OpenDCL 9, position coordinates are in DIP (device independent pixels), which means the values you provide will be multiplied by your current display scaling factor as set in Windows display settings.
Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: XDCAD on November 01, 2018, 04:32:29 AM
Quote from: owenwengerd on November 01, 2018, 04:24:42 AM
Which version of OpenDCL? In OpenDCL 9, position coordinates are in DIP (device independent pixels), which means the values you provide will be multiplied by your current display scaling factor as set in Windows display settings.

9.0.2.0
Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: XDCAD on November 01, 2018, 04:43:51 AM
Quote from: XDCAD on November 01, 2018, 04:32:29 AM
Quote from: owenwengerd on November 01, 2018, 04:24:42 AM
Which version of OpenDCL? In OpenDCL 9, position coordinates are in DIP (device independent pixels), which means the values you provide will be multiplied by your current display scaling factor as set in Windows display settings.

9.0.2.0

I am using the WIN10 system. Are you talking about the text scaling factor of the display settings?

Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: XDCAD on November 01, 2018, 04:48:00 AM
Quote from: XDCAD on November 01, 2018, 04:32:29 AM
Quote from: owenwengerd on November 01, 2018, 04:24:42 AM
Which version of OpenDCL? In OpenDCL 9, position coordinates are in DIP (device independent pixels), which means the values you provide will be multiplied by your current display scaling factor as set in Windows display settings.

9.0.2.0

And the result I want is to put the dialog box in the upper right corner.
In the same WIN10 system, 1920X1080 resolution, the result is correct.

Title: Re: Dcl-form-setpos has problems in 2K, 4K resolution
Post by: owenwengerd on November 01, 2018, 06:38:38 PM
You should use (dcl-GetScreenSize) (http://www.opendcl.com/HelpFiles/index.php?page=Reference/Function/GetScreenSize.htm) to obtain the display dimensions in DIP.