CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    How can I print form using Landscape format?

    I found printform function can only print form using portrait format. How can i print form using Landscape format?

    I couldn't find more documents for VB print, can anyone give me some good suggestion?

    Thank you!

    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  2. #2
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: How can I print form using Landscape format?

    did you try

    Printer.Orientation = vbPRORLandscape

    before Printform?


  3. #3
    Join Date
    Aug 1999
    Location
    California
    Posts
    264

    Re: How can I print form using Landscape format?

    I tried to set center the printed form on the page and use zoom property, but can not work. I don't know why.

    Printer.ScaleLeft = -((Printer.Width - FrmTestGraph.Width) / 2)
    Printer.ScaleTop = -((Printer.Height - FrmTestGraph.Height) / 2)

    Printer.Zoom=50




    Best Regards,

    Kevin Shen
    Best Regards,

    Kevin Shen

  4. #4
    Join Date
    Mar 1999
    Location
    Nepal
    Posts
    540

    Re: How can I print form using Landscape format?

    The Zoom property is not guaranteed to work on all printers. It works on most laser printers, but not on many inkjet printers.


  5. #5
    Join Date
    Nov 2001
    Posts
    10

    Re: How can I print form using Landscape format?

    I tried this code printer.orientation = vbPRORLandscape for printing the form in landscape using command button on the form. But if I click the print command second time it gives me the error "can't print form image to this type of printer". I also tried setting it to vbPRORPortait after printing but gives the same error.
    can somebody please help to resolve this problem


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

Featured