CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Feb 2000
    Location
    Indiana USA
    Posts
    193

    Rotate Print 90 degrees within a page

    I am trying to print a page with 4 lines landscaped, and one line portrait. I know you can not change the orientation mid page, so is there any property to use to rotate one line. In DOS, you could send commands to the print, but in trying this in VB just prints the literal command. Here is the code I am currently using for the landscaped lines, I need to print the employee number vertically on the left side of the page. Thanks in advance for any help.

    Catrina

    With MyFont
    .Bold = true
    .Name = "courier new"
    End With
    set Printer.Font = MyFont
    Printer.FontSize = 12
    Printer.Orientation = vbPRORLandscape

    If StopPrint$ = "Y" then End
    SavEmp& = Val(rsMast!PayEmp)
    Printer.CurrentY = 10130
    Printer.print " " & RTrim(rsMast!LName); ", "; rsMast!FstName;

    Printer.CurrentY = 10450
    Printer.print " Emp No " & Right(" " & CStr(Val(rsMast!PayEmp)), 6);

    If SavEmp& <> Val(rsMast!PayEmp) then
    BEEP
    BEEP
    Label3(0).Caption = "Emp#" + CStr(SavEmp&) + _
    " printed as emp# " + rsMast!PayEmp
    Label3(1).Caption = "**PLEASE CHECK time SHEET** -Press any key to continue-"
    Do While StopPrint$ = ""
    DoEvents
    Loop
    End If
    Printer.CurrentY = 10720
    Printer.print " Div " & Right(" " & rsMast!cdiv, 4) & " Dept " & _
    Right(" " & rsMast!cdEPT, 4);
    Printer.CurrentY = 10990
    Printer.print " Week Ending " + Zout$;
    Printer.EndDoc






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

    Re: Rotate Print 90 degrees within a page


  3. #3
    Join Date
    Feb 2000
    Location
    Indiana USA
    Posts
    193

    Re: Rotate Print 90 degrees within a page

    That is not what I need, I need for the text to be rotated 90 degrees, so that it is up and down as in Portrait print.

    The example you pointed me to flips the text but it remains parallel
    Catrina


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

    Re: Rotate Print 90 degrees within a page

    Did you try changing

    Angle = 1800

    to

    Angle = 900?

    Angle should be set to 10 times the angle that you want to rotate the text.


  5. #5
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Rotate Print 90 degrees within a page

    You really need to look at this
    http://www.vb-helper.com/HowTo/rotprint.zip

    John G

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