Hello all,
I'm using VB6.0 to write an application which prints a report. The problem I
have occurs when I try to allow the user to select the number of copies and
which pages to print.
Using the code below doesn't show the printer box to allow the selections to
be made but printing happens anyway.
The PrintRoutine subroutine (not shown) is copied from the MS knowledge base
allowing printing to a printer or to a print preview form by passing the
appropriate parameter. (The print preview works fine, but doesn't use a
CommonDialog call anyway.)
I don't think the problem lies in the print routine as it isn't called till
later anyway.
I use other CommonDialog functions elsewhere in the programme to select
files from a directory without any problems. Just can't see what I'm doing
wrong, or not doing at all.
Suggestions please......
TIA,
Dave
_______________ _______________ _______________ _______________ _______________ _______
Code snippet follows:
CommonDialog1.A ction = 5
CommonDialog1.S howPrinter
' Get user selected values
BeginPage = CommonDialog1.F romPage
EndPage = CommonDialog1.T oPage
Numcopies = CommonDialog1.C opies
' Code to use start and finish pages and no. of copies to be added later
PrintRoutine Printer
Printer.EndDoc
I'm using VB6.0 to write an application which prints a report. The problem I
have occurs when I try to allow the user to select the number of copies and
which pages to print.
Using the code below doesn't show the printer box to allow the selections to
be made but printing happens anyway.
The PrintRoutine subroutine (not shown) is copied from the MS knowledge base
allowing printing to a printer or to a print preview form by passing the
appropriate parameter. (The print preview works fine, but doesn't use a
CommonDialog call anyway.)
I don't think the problem lies in the print routine as it isn't called till
later anyway.
I use other CommonDialog functions elsewhere in the programme to select
files from a directory without any problems. Just can't see what I'm doing
wrong, or not doing at all.
Suggestions please......
TIA,
Dave
_______________ _______________ _______________ _______________ _______________ _______
Code snippet follows:
CommonDialog1.A ction = 5
CommonDialog1.S howPrinter
' Get user selected values
BeginPage = CommonDialog1.F romPage
EndPage = CommonDialog1.T oPage
Numcopies = CommonDialog1.C opies
' Code to use start and finish pages and no. of copies to be added later
PrintRoutine Printer
Printer.EndDoc
Comment