Question:
At run time, how can I retrieve the DPI of a screen open in an E3Viewer?
Solution:
To do so, you must write a script similar to the example below in a button’s Click() event.
Example:
strComputer = “.”
Set objWMIService = GetObject(“winmgmts:\\” & strComputer & “\root\CIMV2”)
Set colItems = objWMIService.ExecQuery(“SELECT * FROM Win32_DesktopMonitor”,,48)
For Each objItem in colItems
MsgBox “PixelsPerXLogicalInch: ” & objItem.PixelsPerXLogicalInch
MsgBox “PixelsPerYLogicalInch: ” & objItem.PixelsPerYLogicalInch
Next