Guest User

Untitled

a guest
Feb 23rd, 2018
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.83 KB | None | 0 0
  1. If metin.Height >= metin.Width Then
  2. Printer.Orientation = vbPRORPortrait ' Taller than wide.
  3. Else
  4. Printer.Orientation = vbPRORLandscape ' Wider than tall.
  5. End If
  6. textRatio = metin.Width / metin.Height
  7. printerWidth = Printer.ScaleX(Printer.ScaleWidth, Printer.ScaleMode, vbHimetric)
  8. printerHeight = Printer.ScaleY(Printer.ScaleHeight, Printer.ScaleMode, vbHimetric)
  9. printerRatio = printerWidth / printerHeight
  10. If textRatio >= printerRatio Then
  11. printerTextWidth = Printer.ScaleX(printerWidth, vbHimetric, Printer.ScaleMode)
  12. printerTextHeight = Printer.ScaleY(printerWidth / textRatio, vbHimetric, Printer.ScaleMode)
  13. Else
  14. printerTextHeight = Printer.ScaleY(printerHeight, vbHimetric, Printer.ScaleMode)
  15. printerTextWidth = Printer.ScaleX(printerHeight * textRatio, vbHimetric, Printer.ScaleMode)
  16. End If
  17.  
  18. Printer.Print metin
Add Comment
Please, Sign In to add comment