Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to change display settings: screen resolution, screen refresh rate
Custom GDI+ class
Capturing keyboard activity of another application with the Raw Input API (VFP9)
How to display Windows On-Screen Keyboard
How to print a bitmap file
Using the LoadImage function to have a bitmap file loaded and displayed on VFP main window
Winsock: sending email messages (SMTP, port 25)
System Image List Viewer
Creating the Save dialog box to specify the drive, directory, and name of a file to save
The window and its ancestors
Custom HttpRequest class (WinHTTP)
Printing Image File, programmatically set print page orientation to landscape
Using Video Capture: displaying on FoxPro form frames and previewing video obtained from a digital camera
How to convert a bitmap file to monochrome format (1 bpp)
Mapping and disconnecting network drives
Custom FTP Class for Visual FoxPro application
Using EnumPrinters function to enumerate locally installed printers
Displaying the associated icons and descriptions for files and folders
How to activate Windows Calculator
How to download a file from the FTP server using FtpGetFile
Sending email messages with Simple MAPI
Confining Windows calculator inside the VFP main window
How to print FoxPro form
Windows Shell Icons displayed and exported to ICO files (Vista)
How to retrieve the number of print jobs queued for the printer

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
Versions:
click to open
Before you begin:
See also:
  • How to delete all print jobs for a printer
  • Retrieving default spooling directory name
  • Simple printer queue monitor

  • Enumerating locally installed printers
  • Enumerating printer drivers installed
  • Enumerating the print processors and supporting data types installed on the specified server

  • Enumerating print jobs and retrieving information for default printer
  • Enumerating the ports that are available for printing on a specified server

  •  
      Members area. Log in to view this example.
     
      User name:
      Password:
     
     
      Forgot your password?
     
      Sign up for
    the Membership
     
     


    User rating: 0/10 (0 votes)
    Rate this code sample:
    • ~
    1777 bytes  
    Created: 2003-01-14 10:44:29  
    Modified: 2011-12-10 09:20:22  
    Visits in 7 days: 75  
    Listed functions:
    ClosePrinter
    GetLastError
    GetPrinter
    GetProfileString
    OpenPrinter
    Printer friendly API declarations
    My comment:
    This is a very simple code that uses the GetPrinter API function with Level parameter set to 2. The default printer name is retrieved from Windows Registry. For Windows NT/XP you can use the GetDefaultPrinter function instead.

    To run this code for another printer, not the default one, assign its name to lcPrinter variable.

    More detailed information about the printer queue is returned by the EnumJobs function. It includes MachineName, UserName, Document, Status, SysTime, PagesPrinter and other parameters.
    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)
    6.15 min.Example: 'How to print FoxPro form'
    6.23 min.Function: 'WTSOpenServer'
    Function group: 'Terminal Services'
    33.18 min.Example: 'How to block the ALT+TAB shortcut (WinXP)'
    33.3 min.Function: 'midiOutGetNumDevs'
    Function group: 'Windows Multimedia'
    3 hrs.Example: 'Obtaining a handle to the desktop associated with the calling thread'
    5.4 hrs.Example: 'Using GetNearestColor'
     Function: 'GetWindowsDirectory'
     Function: 'NetServerEnum'
    7.22 hrs.Example: 'CryptoAPI: Collection of Providers class'
    7.23 hrs.Function: 'WTSRegisterSessionNotification'
    Function group: 'Terminal Services'
    Google
    Advertise here!