Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to retrieve list of system DSNs (Data Source Name) with parameters
Listing INF files in a specified directory
Retrieving list of available disk drives
Attaching menu to a top-level form
GetProcessVersion points at target OS
Obtaining provider name for a specific type of network
Passing data records between VFP applications via the Clipboard
Starting external program from VFP and waiting for its termination
Using InternetSetFilePointer when resuming interrupted download from the Internet
Displaying dimmed window behind VFP top-level form
Displaying printer-properties Property Sheet for the specified printer
Enumerating the subkeys of a user-specific key
How to retrieve number of objects in the Recycle Bin
Opening the Page Setup dialog box to specify the attributes of a printed page
Using FtpCommand
Winsock: reading and setting socket options
Converting command-line string to a set of Unicode argument strings (WinNT only)
Retrieving the name and type of all available RAS-capable devices
Storing registration key in the resources of an executable file
Uploading file to the FTP server using InternetWriteFile
Using mailslots to send messages on the network
Converting a hexadecimal string to an integer
Get the power status of your laptop computer
How to browse and connect to printers on a network (WinNT)
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: 166  
    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 (54.234.231.49)
    1.04 hrs.Example: 'WAV file player'
    6.52 hrs.Function: 'GetCurrentProcess'
    Function group: 'Process and Thread'
     Function: 'mmioDescend'
     Function: 'GdipDeleteGraphics'
    Function group: 'GDI+ Graphics'
    10.81 hrs.Example: 'Storing screen shot of a form to bitmap file'
    12.57 hrs.Example: 'Using shared memory to exchange data between two FoxPro applications'
     Example: 'Hiding mouse cursor'
    12.58 hrs.Example: 'Using the IsWindowEnabled function'
    21.29 hrs.Example: 'How to set Creation Date/Time for a folder (WinNT)'
    21.3 hrs.Example: 'How to display a user-defined icon in the MessageBox dialog'
    Google
    Advertise here!