Results 1 to 4 of 4

Thread: Printing Help?

  1. #1

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681

    Printing Help?

    I think I have pulled out all of my hair!!!

    I have 2 issues:

    1) The PrintPreviewDialog is only printing the last page of my document.

    2) When using the PrintDialog - I set the default to landscape, but this does not work on NT 4 machines.

    Anyone experience the same or have any thoughts?

    --Darrel

  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Yeah um... you have to kind of post your code.

    Printing with VB .NET is a pain in the ass and to simply print a couple of apges of text, I've seen pages of code just to print it.

    I was shocked, figured microsoft would of had some sort of print function in the .NET framework to make it a breeze.

  3. #3

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    OK, I figured out the first issue, but the second one is still valid, and I don't see anyway around it.

    Here is my code snippet for my printpage event:
    VB Code:
    1. Private Sub pdcDocToBePrinted_PrintPage(ByVal sender As Object, ByVal e As _
    2.         System.Drawing.Printing.PrintPageEventArgs) Handles pdcDocToBePrinted.PrintPage
    3.  
    4.         Try
    5.             'Make sure the orientation is landscape
    6.             e.PageSettings.Landscape() = True
    7. ....

    I also tried setting the document default settings before the print is requested:

    VB Code:
    1. pdcDocToBePrinted.PrinterSettings.DefaultPageSettings.Landscape = True

    The thing is - the Preview shows it in landscape, but the printout is in portrait! This only happens on NT, 2000 works fine. I should also mention that the NT machine and the 2000 machine had the same printer as the default printer.

    Any help or ideas / thoughts would be very welcome and appreciated.

  4. #4

    Thread Starter
    Fanatic Member VBCrazyCoder's Avatar
    Join Date
    Apr 2003
    Posts
    681
    Anyone experience this or have any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width