View and Select Printers

Category:
Windows 2000/XP
Type:
Applications
Difficulty:
Advanced

Author: Anonymous

Version Compatibility: Visual Basic 6, Visual Basic 5

More information:
This code will help you to list all the printers connected with a computer, then choose an appropriate one for printing. To test, you will need to add 2 command button controls, a listBox control and 2 labels.

Instructions: Copy the declarations and code below and paste directly into your VB project.

Declarations:

Code: