Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Winsock: how to retrieve a service information corresponding to a port
Determining whether or not the system is connected to the Internet
How to empty the Recycle Bin
Reading virtual key status values and key names
Retrieving list of files on the FTP directory
Returning some basic information for the specified INF file
Accessing Windows Control Panel from VFP Application
Converting twips to pixels and vice versa
Creating a directory on the FTP
Displaying the drive type value
Obtaining MAC address through Address Resolution Protocol (ARP) request
Enumerating sessions established on a server
PocketPC: custom RAPI class for executing routines on remote Windows CE device
Retrieving information about MS-DOS device names using QueryDosDevice (WinNT only)
Using shared memory to exchange data between two FoxPro applications
GDI+: rotating images using matrix transformations
How to initiate System shutdown
How to view icons stored in executable files (Icon Viewer) - II
GDI+: Using Scale and Shear transformations
How to display picture stored in enhanced-format metafile (*.emf)
How to hot-track menu item selection in top-level form (requires VFP9)
How to save registry key including its subkeys and values to a file
Reading and setting system access privileges for the current process
Using the GetLogicalDriveStrings
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: 77  
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 (184.72.184.104)
1.2 hrs.Example: 'How to play a waveform sound (a WAV file in particular)'
Language: 'C#'
1.78 hrs.Example: 'Retrieving information about the main VFP window'
 Solution: 'Extended MessageBox Library (assembly) for .NET'
 Project
2.44 hrs.Example: 'Using IsChild() for testing ThisForm.ShowWindow property'
 Example: 'How to find which fonts Windows uses for drawing captions, menus and message boxes'
3.25 hrs.Function: 'DragDetect'
7.28 hrs.Function: 'GetDeviceCaps'
7.53 hrs.Function: 'AVIStreamReadFormat'
 Example: 'Obtaining list of tables stored in an ODBC Data Source'
Google
Advertise here!