Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Printer Dialog

Status
Not open for further replies.

Zoee

Technical User
Jul 18, 2002
4
US
VB6 deployed Crystal report with CRViewer. Selecting a printer was working with Wiondows 98. Upgraded to Windows 200, select printer works but after printing the Crystal report, other applications cannot print to their default generic text printer unless you turn the printer on/off.

Would appreciate your suggestions, thanks for your reply.

Here is our code

Dim intChoice As Integer

'Do not use the Crystal Reports default printer dialog box
UseDefault = False
intChoice = MsgBox("Select printer for report?", vbYesNoCancel + vbQuestion)

If (intChoice = vbYes) Then
'Create an instance of the Printer Setup dialog box
'Set the handle of the Printer Setup dialog box to the form
Report.PrinterSetup frmAxleSummaryTkHist.hWnd
'Print the report to the selected printer. If the user cancelled from
'the Print Setup form, the report is printed to the default printer.
Report.PrintOut False
ElseIf (intChoice = vbNo) Then
'Print the report, but do not prompt the user again & print to default printer.
Report.PrintOut False
End If
End Sub 'CRViewer1_PrintButtonClicked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top