AlexMesquita
Active member
- Joined
- Jan 6, 2004
- Messages
- 29
How can I make the text stop at the right margin of the page?
Here is the code that I am using. I can only configure the left margin and the text always crosses the right limit of the leaf. Could you help me with that?
Thanks.
Here is the code that I am using. I can only configure the left margin and the text always crosses the right limit of the leaf. Could you help me with that?
Thanks.
Code:
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal texto As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
Dim linhasPorPagina As Single = 0
Dim Posicao_Y As Single = 0
Dim contador As Integer = 0
Dim MargemEsquerda As Single = texto.MarginBounds.Left - 50
Dim MargemSuperior As Single = texto.MarginBounds.Top
Dim linha As String = Nothing
Dim FonteDeImpressao As Font = Me.rtbRichText.Font
Dim meupincel As New SolidBrush(Color.Black)
Calcula o numero de linhas por p