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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Has anyone used .PrintSetup Successfully?

Status
Not open for further replies.

BradB

MIS
Jun 21, 2001
237
US
Has anyone used .PrintSetup successfully? I've downloaded the Printer Settings example on Seagates website, and even THAT example doesn't work. I get a blank page everytime. I've read just about eveything there is on .PrintSetup and .PrintOut. I'm using CR8.5 and RDC.

I would like to hear someone, anyone, who has used the .PrintSetup successfully.

Dim Report As New CR1

Option Explicit

Private Sub CRViewer1_PrintButtonClicked(UseDefault As Boolean)

UseDefault = False

On Error GoTo Cancel:
Report.PrinterSetup Me.hWnd
Report.PrintOut True
Exit Sub

Cancel:
MsgBox "Printing cancelled"
Exit Sub

End Sub
 
I have used the .PrintSetup successfully. The only thing I did differently than you is that I specifically said Form1.hwnd instead of me.hwnd. Make sure the Report variable has the right scope. Mine is global, but you may not need it to be global. You will want it to be at least a module level variable since it wasn't defined in the procedure. Other than that mine looks like yours.

Hope this helps,
Lori
 
First, I would like to thank you for acknowledging. Thanks!

In previous attempts I tried specifically calling FrmRDC.hwnd as you've suggested, but with no success. I keep getting a blank page. When I use the default printer, it has no problem printing.

Just for the sake of my sanity, what OS are you using? I'm wondering if .PrintSetup has a problem with Windows NT 4.0.

BradB

 
It turns out I needed to use global varibales when using two separate forms for the frmMain and frmRDC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top