Home All Groups Group Topic Archive Search About
Author
2 Feb 2006 11:48 PM
wagon
We use a program that can only print to the default printer.  Is there
code that would allow VB to change the default printer?

Author
3 Feb 2006 12:06 AM
Karl E. Peterson
wa***@aol.com wrote:
> We use a program that can only print to the default printer.  Is there
> code that would allow VB to change the default printer?

Absolutely.  It's kinda buried within this sample:

  http://vb.mvps.org/samples/PrnInfo

I think it's in the CPrinter class module.
--
Working without a .NET?
http://classicvb.org/
Author
3 Feb 2006 2:39 PM
Harvey Triana
Private Sub btnPrinterSetup_Click()
    On Error GoTo ErrHandler

    cdlGen.Flags = cdlPDPrintSetup
    Printer.TrackDefault = True
    cdlGen.ShowPrinter
    MsgBox "New Default Printer: " & Printer.DeviceName
    Exit Sub

ErrHandler:
'//do something
End Sub

cdlGen is a CommonDialog control

--
<Harvey Triana />
Drilling View© Developer (52 oil wells in 2005)

<wa***@aol.com> escribió en el mensaje
Show quoteHide quote
news:pg65u1hmkleo8j8sdbcb70rfdd1b3pdqss@4ax.com...
> We use a program that can only print to the default printer.  Is there
> code that would allow VB to change the default printer?
>
>