Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Printer Setup
Message
From
24/07/2002 09:54:01
 
 
To
24/07/2002 09:42:31
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00682006
Message ID:
00682015
Views:
17
You can change the default printer for your application using Printer object and Printers collection. Here is example from MSDN:
<B>
The Printers collection enables you to query the available printers so you can specify a default printer for your application. For example, you may want to find out which of the available printers uses a specific printer driver. The following code searches all available printers to locate the first printer with its page orientation set to Portrait, then sets it as the default printer:

Dim X As Printer
For Each X In Printers
   If X.Orientation = vbPRORPortrait Then
      ' Set printer as system default.
      Set Printer = X
      ' Stop looking for a printer.
      Exit For
   End If
Next
</B>
For more information see "Printer Object, Printers Collection" topic in MSDN.

Plamen Ivanov
MCSD .NET Early Achiever and MCAD .NET Charter Member (VB .NET/SQL Server 2000)
MCSD (VB 6.0/SQL Server 2000)

VB (.NET) - what other language do you need in the whole Universe?...

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform