Atlanta Custom Software Development 

   Search        Code/Page

User Login



Forgot the Password?
» Web Development
» Maintenance
» Data Integration/BI
» Information Management
» Regular Expr Tester
» Free Tools

Display the Connect To Printer dialog

Total Hit ( 4544)

Rate this article:     Poor     Excellent 

 Submit Your Question/Comment about this article



Under Windows NT you can programmatically display the Connect To Printer dialog using one simple API function:

Click here to copy the following block
' This works only under Windows NT and 2000
Private Declare Function ConnectToPrinterDlg Lib "winspool.drv" (ByVal hWnd As _
  Long, ByVal flags As Long) As Long

' the 1st argument is the handle of the current form
' the 2nd argument is reserved and must be zero
ConnectToPrinter Me.hWnd, 0

Under Windows 9x, however, this API isn't supported, and the closest you can get is display the Add Printer wizard, as follows:

Click here to copy the following block
' this works under Windows 95, 98, NT and 2000
Shell "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter"

Submitted By : Nayan Patel  (Member Since : 5/26/2004 12:23:06 PM)

Job Description : He is the moderator of this site and currently working as an independent consultant. He works with, SQL Server and other MS technologies. He is, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting.
View all (893) submissions by this author  (Birth Date : 7/14/1981 )

Home   |  Comment   |  Contact Us   |  Privacy Policy   |  Terms & Conditions   |  BlogsZappySys

© 2008 BinaryWorld LLC. All rights reserved.