Common dialog control printing problems 
Author Message
 Common dialog control printing problems

I have two problems with attempting to print from the Windows print
box, after accessing it via the Common dialog control in VB5.
1/  In the Windows print box the default paper size is set to A4, but
when I use the common dialog control to access the same print box, the
image persistently prints at a paper size of Custom (76mm x 127mm),
the smallest page size of all.  I have to keep clicking on "Restore
default" every time I want to print.  How can the paper size be
prevented from automatically changing from the A4 default setting?
2/ When using the common dialog control, how do you get the Windows
print box to disappear off the screen when clicking its Cancel button?
I don't want an error message to keep appearing; just a nice neat
cancel out.  And when I avoid the error message, the image prints out
anyway (at 76mm x 127mm)!
The present code is below;  it needs some changes.  Any advice
appreciated.

Private Sub Print_Click()

        CommonDialog1.ShowPrinter
        CommonDialog1.CancelError = True

        X = Printer.ScaleWidth / 2 - Picture2.Width / 2
        Y = Printer.ScaleHeight / 2 - Picture2.Height / 2
        Printer.PaintPicture Picture2, X, Y
        Printer.EndDoc

    End Sub

Thanks,
Roger



Mon, 09 Apr 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Microsoft Common Dialog Control 6.0 Problem (Print Dialog)

2. Question about the Common Dialog print dialog control

3. Problem with PageNums Always the Default in Print Common Dialog - Even with cdlPDAllPages set

4. Problems with Print Common dialog under NT

5. Problem on Common dialog box (Print)

6. Common Dialog Print Problems

7. Print Common Dialog problems

8. Problem with Common Dialog: Print

9. Common Dialog Print problem

10. Common Dialog Print NT problem

11. Printing Problem with Common Dialog

12. Common Dialog Print Problems

 

 
Powered by phpBB® Forum Software