Using Win32 functions in Visual FoxPro Image Gallery
Function Groups:
All Functions 1306
Atom 1
Authentication 14
Authorization 6
Bitmap 9
Brush 2
Clipboard 20
Color 1
Common Dialog Box 12
Console 12
Coordinate Space and Transformation 9
Cryptography Reference 28
Cursor 5
Data Decompression Library 3
Debugging 2
Desktop Window Manager (DWM) 1
Device Context 13
Device Input and Output 1
Dialog Box 6
DNS Functions 1
Dynamic-Link Library 6
Error Handling 10
Event Logging 10
Extensible Storage Engine (ESE, Jet Blue) 23
File Management 49
File Mapping 4
File System 19
Filled Shape 2
Font and Text 13
GDI+ 6
GDI+ Bitmap 10
GDI+ Brush 4
GDI+ Font 9
GDI+ Graphics 28
GDI+ Image 20
GDI+ ImageAttributes 3
GDI+ Matrix 10
GDI+ PathGradient Brush 3
GDI+ Pen 2
GDI+ StringFormat 2
GDI+ Text 2
Handle and Object 4
Hook 2
HTTP Functions (WinHTTP) 12
Icon 7
Internet Functions (WinInet) 49
IP Helper 24
Kernel Transaction Manager 3
Keyboard Input 22
Mailslot 3
Memory Management 26
Menu 18
Message and Message Queue 12
Metafile 6
Monitor Configuration (Vista) 8
Mouse Input 8
MSHTML Reference 1
Multilingual User Interface 4
Multiple Display Monitors 2
National Language Support 20
Network Management 34
Painting and Drawing 17
Path 3
Performance Monitoring 12
Pipe 5
PnP Configuration Manager 6
Power Management 6
Printing and Print Spooler 35
Process and Thread 31
Raw Input 4
Region 7
Registry 21
Remote Access Service (RAS) 5
Remote Application Programming (RAPI) 49
Remote Procedure Call (RPC) 7
Resource 10
Security 22
Service 11
Setup API functions 7
Shell Functions 39
Shell Lightweight Utility APIs -- misc. functions 2
Shell Lightweight Utility APIs -- Path Functions 20
Shell Lightweight Utility APIs -- string functions 4
Simple MAPI 9
String 10
Synchronization 13
System Information 23
System Shutdown 5
Terminal Services 10
Time 16
Unicode and Character Set 2
URL Monikers 7
Version Information 2
Virtual Hard Disk (Win7) 4
Window 37
Window Class 8
Window Procedure 3
Window Property 3
Window Station and Desktop 7
Windows Controls 8
Windows Multimedia 76
Windows Networking 18
Windows Sockets 2 (Winsock) 38
Printing and Print Spooler            ..msdn    Add comment
AddPort Adds the name of a port to the list of supported ports. The AddPort function is exported by the port monitor.
AddPrinter The AddPrinter function adds a printer to the list of supported printers for a specified server.
ClosePrinter The ClosePrinter function closes the specified printer object.
ConfigurePort The ConfigurePort function displays the port-configuration dialog box for a port on the specified server.
ConnectToPrinterDlg The ConnectToPrinterDlg function displays a dialog box that lets users browse and connect to printers on a network. If the user selects a printer, the function attempts to create a connection to it; if a suitable driver is not installed on the server, the user is given the option of creating a printer locally.
DeletePort Displays a dialog box that allows the user to delete a port name.
DeviceCapabilities The DeviceCapabilities function retrieves the capabilities of a printer device driver.
DocumentProperties The DocumentProperties function retrieves or modifies printer initialization information or displays a printer-configuration property sheet for the specified printer.
EndDoc The EndDoc function ends a print job.
EndPage The EndPage function notifies the device that the application has finished writing to a page. This function is typically used to direct the device driver to advance to a new page.
EnumForms The EnumForms function enumerates the forms supported by the specified printer.
EnumJobs The EnumJobs function retrieves information about a specified set of print jobs for a specified printer.
EnumPorts The EnumPorts function enumerates the ports that are available for printing on a specified server.
EnumPrinterData The EnumPrinterData function enumerates configuration data for a specified printer.
EnumPrinterDrivers Enumerates the printer drivers installed on a specified printer server.
EnumPrinters The EnumPrinters function enumerates available printers, print servers, domains, or print providers.
EnumPrintProcessorDatatypes The EnumPrintProcessorDatatypes function enumerates the data types that a specified print processor supports.
EnumPrintProcessors The EnumPrintProcessors function enumerates the print processors installed on the specified server.
Escape The Escape function enables applications to access capabilities of a particular device not directly available through GDI. Escape calls made by an application are translated and sent to the driver.
FindClosePrinterChangeNotification Closes a change notification object created by calling the FindFirstPrinterChangeNotification function.
FindFirstPrinterChangeNotification Creates a change notification object and returns a handle to the object. You can then use this handle in a call to one of the wait functions to monitor changes to the printer or print server.
FindNextPrinterChangeNotification Retrieves information about the most recent change notification for a change notification object associated with a printer or print server. Call this function when a wait operation on the change notification object is satisfied.
FreePrinterNotifyInfo Frees a system-allocated buffer created by the FindNextPrinterChangeNotification function.
GetDefaultPrinter The GetDefaultPrinter function retrieves the printer name of the default printer for the current user on the local computer.
GetPrinter The GetPrinter function retrieves information about a specified printer.
GetPrinterData The GetPrinterData function retrieves configuration data for the specified printer or print server.
GetPrinterDriverDirectory The GetPrinterDriverDirectory function retrieves the path of the printer-driver directory.
GetPrintProcessorDirectory The GetPrintProcessorDirectory function retrieves the path for the print processor on the specified server.
OpenPrinter The OpenPrinter function retrieves a handle to the specified printer or print server or other types of handles in the print subsystem.
PrinterProperties The PrinterProperties function displays a printer-properties property sheet for the specified printer.
SetDefaultPrinter Sets the printer name of the default printer for the current user on the local computer.
SetJob The SetJob function pauses, resumes, cancels, or restarts a print job on a specified printer. You can also use the SetJob function to set print job parameters, such as the print job priority and the document name.
SetPrinter The SetPrinter function sets the data for a specified printer or sets the state of the specified printer by pausing printing, resuming printing, or clearing all print jobs.
StartDoc The StartDoc function starts a print job.
StartPage The StartPage function prepares the printer driver to accept data.
Code examples:
Printing Image File, programmatically set print page orientation to landscape
Using Change Notification Objects to monitor changes to the printer or print server
How to print FoxPro form
How to print a bitmap file
How to print FoxPro form -- II
GDI+: sending image of FoxPro form to printer
Retrieving the name of the default printer for the current user on the local computer (Win NT/XP)
Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)
How to print picture stored in enhanced-format metafile (*.emf)
Simple printer queue monitor: deletes, pauses, resumes print jobs for local printer
GDI+: printing image file
Printing text with the Escape function
How to retrieve the number of print jobs queued for the printer
Configuring DEVMODE structure for a printer
Enumerating ports that are available for printing on a specified server
How to delete all print jobs for a printer
How to browse and connect to printers on a network (WinNT)
Enumerating forms supported by a specified printer
Displaying printer-properties Property Sheet for the specified printer
Setting default printer
How to retrieve configuration data for a specified printer stored in the registry (PrinterDriverData key)
Adding printer to the list of supported printers for the specified server
Retrieving default spooling directory name
Enumerating print processors and supporting data types installed on the specified server
Using EnumPrinters function to enumerate locally installed printers
Enumerating printer drivers installed
How to display the port-configuration dialog box for a port on the specified server
Retrieving the path of the printer-driver directory and printer-processor directory
Retrieving list of supported paper names (for example, Letter or Legal) for a given printer
User Contributed Notes:
Hayat | 2005-03-31 11:17:24
Can anyone help me. What I'm trying to do is write a program that gives a quota to every user on the network. 100 pages per month or something. I want to know what happens when you click print. It goes to the print server and is the print spooler always on? How does it know when a print job is sent? Can I stop all print requests to go to the spooler before enering my program. How can I know how many pages have been printed? Any help on how I can inegrate my program with the windows print spooler will be appreciated. Please I need help asap. Please email it to if you have anything. Thanks.
chepot | 2005-04-23 00:51:31
Can anyone help me. Can VFP printing data with Crystal report or any third program? How I can integrate in my program? My email is
Benman | 2005-04-26 18:08:18
Can anyone help me. I want to control orientation of "Microsoft Office Document Image Writer" printer. Any simple method to control it being Landscape or Portriat in VFP program code....... plz help ............ | 2005-06-26 09:45:46
As far as I know, there is no easy way to check for the status of a printer like paper out, online, printer error, etc. with the Windows API. I did a lot of searching on this subject but no luck so far. Please let me know if anyone finds an 'elegant' solution.
Jabez | 2005-10-24 13:09:54

Does anyone know how to change the paper size and orientation at run time using Visual Foxpro 7.0 ?

Copyright 2001-2017 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.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (
7 sec.Function: 'FindClosePrinterChangeNotification'
14 sec.Function: 'GetLastError'
20 sec.Function: 'CeRegQueryValueEx'
27 sec.Function: 'SetCapture'
34 sec.Function: 'GdipSetPageScale'
42 sec.Function: 'capGetDriverDescription'
48 sec.Function: 'FtpCreateDirectory'
56 sec.Function: 'ReadProcessMemory'
1.07 min.Function: 'GdipGetImageHorizontalResolution'
1.2 min.Function: 'GdipSetImagePalette'
Advertise here!