Using Win32 functions in Visual FoxPro Image Gallery
Code examples:
How to browse and connect to printers on a network (WinNT)
How to perform Base64 encoding/decoding using Cryptography API Functions
Retrieving configuration information for the specified workstation (Win2000/XP)
Using Shell for performing operations on files
Accessing Windows Control Panel from VFP Application
Comparing file times
How to display a dialog box with which the user can add a data source (DSN)
Retrieving country-specific dialing information from the Windows Telephony list of countries
Starting a dialog box for connecting to network resources and passing input parameters
Using an Event Object. Part A: running an application that creates an Event object
Winsock: retrieving information from a host database for a given host name
Accessing LSA Policy object (Local Security Authority)
Converting characters in a URL into corresponding escape sequences and backwards
Locking the workstation
Pocket PC: creating new database in the Object Store and copying Contacts Database records into it
Retrieving Printer Device Context using PrintDlg function
Setting the volume label
Connecting a local device to a network resource
Copying files as a transacted operation (Vista)
Dial the Net Automatically
How to retrieve list of system DSNs (Data Source Name) with parameters
Retrieving current settings for an ODBC connection
Retrieving window and menu help context identifiers
Saving available locale records into a cursor
How to browse and connect to printers on a network (WinNT)

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:
The ConnectToPrinterDlg function -- on which this example is based -- 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.
 
  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:
  • ~
1952 bytes  
Created: 2003-01-26 17:05:50  
Modified: 2009-01-03 15:26:33  
Visits in 7 days: 67  
Listed functions:
ClosePrinter
ConnectToPrinterDlg
GetActiveWindow
GetPrinter
GlobalAlloc
GlobalFree
Printer friendly API declarations
My comment:
A calling application can determine whether the function has created a printer locally by calling GetPrinter with a PRINTER_INFO_2 structure, then examining that structure"s Attributes member.

An application should call DeletePrinter to delete a local printer. An application should call DeletePrinterConnection to delete a connection to a printer.
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 (107.21.156.140)
19.87 min.Example: 'How to display Windows On-Screen Keyboard'
19.93 min.Function: 'SHGetSpecialFolderLocation'
Function group: 'Shell Functions'
19.98 min.Example: 'Enumerating print processors and supporting data types installed on the specified server'
41.3 min.Example: 'Enumerating print jobs and retrieving information for default printer (JOB_INFO_1 structures)'
1.06 hrs.Function: 'MAPIResolveName'
Function group: 'Simple MAPI'
 Example: 'How to create transparent areas inside a form -- punching holes in the form'
1.16 hrs.Example: 'Using vendor-neutral SQL constructs'
 Example: 'Bitmap Class for Visual FoxPro application'
3.4 hrs.Example: 'How to display the Properties dialog box for a file (ShellExecuteEx)'
 Function: 'GetClipboardOwner'
Function group: 'Clipboard'
Google
Advertise here!