Printing - Right Justified

  • Thread starter Thread starter Luke Vogel
  • Start date Start date
L

Luke Vogel

Hi All ...

I'm trying to print some text (for an automated letter) right justified
using the printdocument classes.

I know how to determine the left and right margins, but how do I set the
starting point for a string of text so that it finishes printing at the
right most margin?
 
Luke Vogel said:
I'm trying to print some text (for an automated letter) right justified
using the printdocument classes.

I know how to determine the left and right margins, but how do I set the
starting point for a string of text so that it finishes printing at the
right most margin?

\\\
Dim sf As New StringFormat()
sf.Alignment = StringAlignment.Far
e.Graphics.DrawString( _
"Hello World" & ControlChars.NewLine & "Bla", _
Me.Font, _
SystemBrushes.ControlText, _
New RectangleF(10, 10, 100, 100), _
sf _
)
sf.Dispose()
///
 
Back
Top