+ Reply to Thread
Results 1 to 2 of 2

ProblemRetrieving Display Information

  1. #1
    Registered User
    Join Date
    01-18-2013
    Location
    O'Fallon, MO
    MS-Off Ver
    Excel 2007
    Posts
    1

    ProblemRetrieving Display Information

    I'm using EnumDisplayDevices to retrieve display information into a DEVMODE data structure.

    Private Type DEVMODE
    dmDeviceName As String * CCHDEVICENAME
    dmSpecVersion As Integer
    dmDriverVersion As Integer
    dmSize As Integer
    dmDriverExtra As Integer
    dmFields As Long
    dmOrientation As Integer
    dmPaperSize As Integer
    dmPaperLength As Integer
    dmPaperWidth As Integer
    dmScale As Integer
    dmCopies As Integer
    dmDefaultSource As Integer
    dmPrintQuality As Integer
    dmColor As Integer
    dmDuplex As Integer
    dmYResolution As Integer
    dmTTOption As Integer
    dmCollate As Integer
    dmFormName As String * CCHFORMNAME
    dmLogPixels As Integer
    dmBitsPerPel As Long
    dmPelsWidth As Long
    dmPelsHeight As Long
    dmDisplayFlags As Long
    dmDisplayFrequency As Long
    End Type

    I'm interested in retrieving dmPelsWidth, dmPelsHeight, and dmLogPixels. Successful in getting dmPelsWidth and dmPelsHeight (display width and height in pixels), but dmLogPixels is returning as zero. dmLogPixels is defined as the number of pixels per logical inch. Anyone know why this would be coming back as 0?

  2. #2
    Forum Guru JosephP's Avatar
    Join Date
    03-27-2012
    Location
    Ut
    MS-Off Ver
    2003/10
    Posts
    7,328

    Re: ProblemRetrieving Display Information

    I don't believe that attribute is used-perhaps you could use getdevicecaps instead. see here for instance http://www.andreavb.com/tip090002.html
    Josie

    if at first you don't succeed try doing it the way your wife told you to

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1