Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
Retrieving the name and type of all available RAS-capable devices
Using the SetErrorMode for determining if a floppy drive is ready
Writing to INI file
Configuring DEVMODE structure for a printer
GDI+ fun: roach-infested desktop
GDI+: printing vertical text on VFP reports via generated images (VFP8)
GDI+: printing vertical text on VFP reports via generated images (VFP9)
High-powered ALLTRIM
How to control Adobe Reader 9.0 (SDI mode) from VFP application
How to retrieve list of system DSNs (Data Source Name) with parameters
Reading the structure of VFP main menu
Round FoxPro form
Using Extended MessageBox() Class
How to find which fonts Windows uses for drawing captions, menus and message boxes
How to retrieve number of objects in the Recycle Bin
How to view icons stored in executable files (Icon Viewer)
Obtaining list of tables stored in an ODBC Data Source
Reading VFP settings from the Windows Registry
Retrieving current settings for an ODBC connection
Using named pipes for interprocess communication
GDI+: Creating thumbnails to preview images in a directory
Retrieving list of files on the FTP directory
Writing entries to custom Event Log
Yet another modal dialog: now HTML-based
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: 158  
    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 (184.72.91.94)
    5 sec.Example: 'How to assemble an array of strings and pass it to external function'
    Language: 'C#'
    3.77 hrs.Function: 'AVIStreamTimeToSample'
     Function: 'PathFindFileName'
    9.52 hrs.Function: 'SHGetFileInfo'
    9.7 hrs.Example: 'Retrieving configuration information for the specified server (Win98/Me)'
     Example: 'Compressing and decompressing files with Windows API Runtime Library routines'
    10.49 hrs.Example: 'How to download a file from HTTP server using URL Monikers functions'
    Language: 'C#'
    13.94 hrs.Function: 'SHFileOperation'
    1 day(s)Function: 'GetMenuString'
     Example: 'Sending a standard message with one or more attached files using default email client'
    Google
    Advertise here!