Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving various system metrics
Setting and retrieving the double-click time for the mouse
Testing Transparent Menu Class with top-level form (requires VFP9)
Using the CopyFile
Basic Volume information
How to check whether the system is 32-bit or 64-bit
Converting strings between ANSI and OEM
Current directory of the application
Retrieving current user for the process
Saying "Hello World!" with VFP and WinAPI
Using LoadLibrary
Winsock: retrieving the host information corresponding to a network address
Accessing the list of Windows Recent Documents
Converting characters to upper or lower case
Listing device drivers in the system: load addresses, names
Setting the Window Region for a form
Enumerating Performance Counters
GetFileOwner - Get the owner of an NTFS file
Managing Cookies
Retrieving the rectangle area where the mouse cursor is confined
How to create a service object
Retrieving default spooling directory name
Retrieving national language settings
Creating two-byte hashes for a list of URLs
Retrieving various system metrics

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
More code examples    Listed functions    Add comment     W32 Constants      Translate this page Printer friendly version of this code sample
 
#DEFINE SM_CXSCREEN 0
#DEFINE SM_CYSCREEN 1
#DEFINE SM_CYCAPTION 4
#DEFINE SM_CYMENU 15
#DEFINE SM_CXFULLSCREEN 16
#DEFINE SM_CYFULLSCREEN 17
#DEFINE SM_CXFRAME 32
#DEFINE SM_CYFRAME 33
#DEFINE SM_CMOUSEBUTTONS 43
 
    DECLARE INTEGER GetSystemMetrics IN user32 INTEGER nIndex
 
    = PrintLine("Screen width:                   ", SM_CXSCREEN)
    = PrintLine("Screen height:                  ", SM_CYSCREEN)
    = PrintLine("Full-screen client area width:  ", SM_CXFULLSCREEN)
    = PrintLine("Full-screen client area height: ", SM_CYFULLSCREEN)
    = PrintLine("Height of normal caption area:  ", SM_CYCAPTION)
    = PrintLine("Height of single-line menu bar: ", SM_CYMENU)
    = PrintLine("Resizable window frame width:   ", SM_CXFRAME)
    = PrintLine("Resizable window frame height:  ", SM_CYFRAME)
    = PrintLine("Number of mouse buttons:        ", SM_CMOUSEBUTTONS)
 
PROCEDURE PrintLine(cTitle, nMode)
    ? cTitle
    ?? GetSystemMetrics(nMode)
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
941 bytes  
Created: 2001-07-31 12:00:00  
Modified: 2010-01-15 16:19:28  
Visits in 7 days: 49  
Listed functions:
GetSystemMetrics
Printer friendly API declarations
My comment:
See also: SystemParametersInfo, SYSMETRIC

Obtains the screen resolution. Windows XP Mode in Windows 7 chops off two pixels from the screen height (SM_CYSCREEN).
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 (67.202.9.192)
7 sec.Function: 'ExtractAssociatedIcon'
40.45 min.Function: 'waveOutGetNumDevs'
Google
Advertise here!