Click to See Complete Forum and Search --> : [?] dpi resolution
clarghi
July 31st, 2001, 12:19 PM
Hallo,
I want to know the dpi resolution of the pc (control panel - screen): I see I can set large characters (120 dpi), small characters (96 dpi) or customize it.
How can I know what's the actual dpi resolution?
I tried with api enumdisplaysettings but I have not what I want.
Any idea?
an Italian programmer (so, pardon for my ugly English!)
shree
August 1st, 2001, 09:04 AM
It's as easy as this:
dpi = 1440/Screen.TwipsPerPixelX
Clearcode
August 1st, 2001, 11:22 AM
That will give you dots per logical inch, but the problem is that the operating system does not know how many inches across your monitor is so you cannot do better than that for dots per physical inch I'm afraid.
HTH,
Duncan
-------------------------------------------------
Ex. Datis: Duncan Jones
Merrion Computing Ltd
http://www.merrioncomputing.com
Check out the new downloads - ImageMap.ocx is the VB control that emulates an HTML image map, EventVB.OCX for adding new events to your VB form and adding System Tray support simply, MCL Hotkey for implemenmting system-wide hotkeys in your application...all with source code included.
shree
August 1st, 2001, 02:15 PM
Yes, for a printer, or other output device, a logical inch is exactly equal to the physical inch, but for the monitor, we should be contented with the logical inch. Because now, the physical inch depends upon the dimensions of the monitor, the resolution, and even on the width of the screen that you set with the knobs on the monitor.
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.