Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Disk in drive A:
GDI+: creating scaled copy of image file
Storing the environment strings in cursor
Comparing dimensions of the VFP main window with _SCREEN properties
Enumerating global and local group accounts on a server (WinNT/XP/2K)
Enumerating print processors and supporting data types installed on the specified server
GDI+: Color Transparency
Number of clipboard formats available
Retrieving list of all active RAS connections
Retrieving list of available disk drives
Testing an ODBC connection for supporting specific functionality
Using InternetGoOnline function
Yet another modal dialog: now HTML-based
Displaying the drive type value
Drawing standard Windows icons
Finding the path to the VFP executable running
GDI+: printing image file
How to save registry key including its subkeys and values to a file
Printing text on the client area of the main VFP window
Reading VFP settings from the Windows Registry
Enumerating MIDI output devices
GDI+: Storing DLL icon resources in image files
How to download this reference`s archive through WinInet functions using InternetOpenUrl
How to view system icons for the classes installed on the local machine
How to display the port-configuration dialog box for a port on the specified server

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
Before you begin:

Another example shows how to enumerate ports available for printing. Run it to determine valid port names.
 
DO decl
 
* Null means local computer
*= ConfigurePort(Null, GetActiveWindow(), "LPT1:")
*= ConfigurePort(Null, GetActiveWindow(), "FILE:")
 
* as well you can use an existing server name
*= ConfigurePort("\\MYSERV", GetActiveWindow(), "USB001:")
 
IF ConfigurePort(Null, GetActiveWindow(), "COM1:") = 0
*  5 - ERROR_ACCESS_DENIED
* 50 - ERROR_NOT_SUPPORTED
    ? "Error:", GetLastError()
ELSE
* here you have the dialog box displayed (modal)
ENDIF
* end of main
 
PROCEDURE decl
    DECLARE INTEGER GetLastError IN kernel32
    DECLARE INTEGER GetActiveWindow IN user32
 
    DECLARE INTEGER ConfigurePort IN winspool.drv;
        STRING pName, INTEGER hWnd, STRING pPortName
 
 
 

User rating: 0/10 (0 votes)
Rate this code sample:
  • ~
680 bytes  
Created: 2002-12-31 18:40:03  
Modified: 2009-01-03 15:26:33  
Visits in 7 days: 91  
Listed functions:
ConfigurePort
GetActiveWindow
GetLastError
Printer friendly API declarations
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 (50.16.166.175)
3 sec.Example: 'Enhanced GetFont dialog'
1.47 hrs.Function: 'JetEndSession'
 Example: 'Reading and setting Environment variables'
1.69 hrs.Function: 'getnameinfo'
5.89 hrs.Function: 'WNetGetUser'
Function group: 'Windows Networking'
 Function: 'ShellAbout'
6.57 hrs.Example: 'FindText -- the hopeless and useless Common Dialog'
 Example: 'How to draw custom Window Caption on FoxPro form'
6.89 hrs.Function: 'SetComputerName'
Function group: 'System Information'
 Example: 'Using WM_COPYDATA for interprocess communication (VFP9)'
Language: 'C#'
Google
Advertise here!