[ Black One @ 27.10.2010. 18:45 ] @
Pozdrav svima!
Imam jedan mali problem prilikom printanja,
Radim jedan mali program za doktora i trebalo bi mu samo ispisat neke riječi na papir i to sam uspio napravit sve s ovime dole kodom ali imam problem u zadnjem redu tog koda

Code:
args.Graphics.DrawString(txtAmneza.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 130, 275)


txtAmneza nije običan txtbox nego multiline i sad bi htjeo da ga tako i ispiše a ako ima previše znakova on neče ispisat ništa ni da pređe u novi red jel znate kako da ga nateram da piše u novi red sve dok ima teksta?


Code:

Private Sub PrintPageHandler(ByVal sender As Object, ByVal args As Printing.PrintPageEventArgs)
        Static i As Integer = 0
        i = i + 1
        ' Print a line on this page
        args.Graphics.DrawString(txtPrezime.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 175, 140)
        args.Graphics.DrawString(txtDatumRodenja.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 175, 170)
        args.Graphics.DrawString(txtMjesto.Text & ", " & txtAdresa.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 175, 200)
        args.Graphics.DrawString(txtKtk.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 620, 140)
        args.Graphics.DrawString(txtDatum_otpusa.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 615, 170)
        args.Graphics.DrawString(txtDatum_ozljede.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 175, 230)
        args.Graphics.DrawString(txtDatumDolaska.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 175, 255)
        args.Graphics.DrawString(txtVhmp.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 365, 230)
        args.Graphics.DrawString(txtPremjestaj.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 365, 255)
        args.Graphics.DrawString(txtNaRadu.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 520, 230)
        args.Graphics.DrawString(txtBrPrijeve.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 520, 255)
        args.Graphics.DrawString(txtGcs.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 680, 230)
        args.Graphics.DrawString(txtRR.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 680, 255)

        args.Graphics.DrawString(txtAmneza.Text, New Font(Me.Font, FontStyle.Regular), Brushes.Black, 130, 275)
        ' Have we printed enough pages?
        If i >= 1 Then
            ' Done all the pages
            i = 0
            args.HasMorePages = False
        Else
            ' Not finished, yet
            args.HasMorePages = True
        End If
    End Sub
[ sallle @ 04.11.2010. 00:37 ] @
A zasto ne koristis crystal reports ili nesto slicno?
ne znam koji visual studio koristis, al verovatno imas neki reporting...