Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to copy the image of a form to the Clipboard using Bitmap API functions
Retrieving country-specific dialing information from the Windows Telephony list of countries
Obtaining provider name for a specific type of network
Passing data records between VFP applications via the Clipboard
Moving shortcut to a specified position on the Windows Desktop
Placing an arbitrary rectangular area of main VFP window on the Clipboard
Placing On-screen Alert on top of all windows
Retrieving file information for the VFP executable running
Retrieving the name and type of all available RAS-capable devices
Using InternetSetFilePointer when resuming interrupted download from the Internet
Writing to INI file
Class library providing access to the System Registry
Converting a hexadecimal string to an integer
How to browse and connect to printers on a network (WinNT)
How to download this reference`s archive through WinInet functions using InternetOpenUrl
Obtaining list of tables stored in an ODBC Data Source
Reading header information from AVI file
Shortcut Menu Class
Starting external program from VFP and waiting for its termination
Using custom Simple MapiSendMail class
Accessing examples contained in this reference from a VFP application
How to block the ALT+TAB shortcut (WinXP)
Reading VFP settings from the Windows Registry
Creating a unique filename based on existing filename
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: 133  
    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 (107.20.129.212)
    4 sec.Function: 'GetComputerName'
    2.88 hrs.Example: 'Retrieving long values associated with the class of the VFP window'
     Example: 'How to download this reference`s archive through WinInet functions using InternetOpenUrl'
    4.74 hrs.Example: 'Scanning a hierarchy of child windows down from the Windows Desktop'
     Example: 'How to put a vertical text scrolling on the form (a movie cast)'
    5.77 hrs.Function: 'CryptStringToBinary'
     Example: 'Disabling drawing in the VFP form'
    12.89 hrs.Example: 'Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window'
     Function: 'SQLConnect'
    Function group: 'ODBC API'
    14.4 hrs.Example: 'Joining local computer to a domain (XP/2000)'
    Google
    Advertise here!