Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
Custom FTP Class for Visual FoxPro application
How to copy the image of a form to the Clipboard using Bitmap API functions
Retrieving information about the main VFP window
Confining Windows calculator inside the VFP main window
How to enumerate, add and delete shares on the local computer (WinNT/XP)
Starting an external application in VFP using WinExec
Storing screen shot of a form to enhanced metafile (*.emf)
How to ping a remote site using ICMP API calls
GDI+: copying to the Clipboard (a) image of active FoxPro window/form, (b) image file
How to set Creation Date/Time for a folder (WinNT)
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Creating a unique filename based on existing filename
Deleting files into the Recycle Bin
Storing screen shot of a form to bitmap file
How to prevent users from accessing the Windows Desktop and from switching to other applications
How to put a vertical text scrolling on the form (a movie cast)
Initiating Inet connection using a modem
Testing Clipboard functions: emptying the clipboard
How to suspend or hibernate your system
Creating a window using CreateWindowEx function
Tracking mouse movement to detect when to start dragging
Copying picture of the active form to the Clipboard using Enhanced Metafile API functions
Enumerating ODBC Data Sources available on the local computer
How to detect if additional monitor is connected and active

User rating: 9/10 (1 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
Versions:
click to open
Before you begin:
Nowadays having two monitors connected to a PC becomes more a common place rather than exception. This code sample explains how to detect all available monitors through enumerating display devices and their properties.


See also:
  • How to change display settings: screen resolution, screen refresh rate
  • How to adjust monitor brightness (Vista, monitor with DDC support)
  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 9/10 (1 votes)
    Rate this code sample:
    • ~
    4378 bytes  
    Created: 2008-12-09 14:50:37  
    Modified: 2010-12-22 20:36:24  
    Visits in 7 days: 138  
    Listed functions:
    EnumDisplayDevices
    EnumDisplaySettings
    GetMonitorInfo
    MonitorFromWindow
    Printer friendly API declarations
    My comment:
    In the cursor created by this code sample, each connected monitor is indicated by non-empty MonitorName value.

    For an active monitor (the desktop extends to such monitor), several other values are populated:

  • Screenwidth
  • Screenheight
  • Bitsperpixel
  • DsppositionX
  • DsppositionY

    From the screen dimensions and the display position it is possible to determine whether a given window is visible on a particular display.

    * * *
    Read Two monitors are better than one by Tony Northrup published on Microsoft website. Bet he might be busy writing a sequel "N+1 monitors better than N".

    * * *
    Some graphics cards and external units (Matrox) support connections to three and more monitors.
  • Word Index links for this example:
    Translate this page:
      Spanish    Portuguese    German    French    Italian  
    FreeTranslation.com offers instant, free translations of text or web pages.
    User Contributed Notes:
    There are no notes on this subject.


    Copyright © 2001-2013 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

    Privacy policy
    Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.1.55-log), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
    Last Topics Visited (184.72.184.104)
    13.8 min.Example: 'Enumerating network interfaces on the local computer'
    Language: 'C#'
    13.87 min.Function: 'GetDefaultPrinter'
    Function group: 'Printing and Print Spooler'
    1.27 hrs.Function: 'GetShellWindow'
    2.57 hrs.Example: 'Using InternetSetFilePointer when resuming interrupted download from the Internet'
     Example: 'A class that encrypts and decrypts files using Cryptography API Functions'
    6.07 hrs.Function: 'CeRegQueryValueEx'
     Example: 'Displaying bitmap using the AlphaBlend function'
     Example: 'How to assemble an array of strings and pass it to external function'
    18.28 hrs.Example: 'Retrieving information about the main VFP window'
    19.67 hrs.Function: 'RegCloseKey'
    Function group: 'Registry'
    Google
    Advertise here!