Public Class Form24


    Private Sub Form23_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Me.客户TableAdapter.Fill(Me.NorthwindDataSet.客户)
        D1.DataSource = Me.NorthwindDataSet.客户

    End Sub



    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Dim mydgvprint As New VBprinter.DGVprint()
        mydgvprint.MainTitle = "DGVPrint以自动换行的工资条打印方式打印DataGridView"
        mydgvprint.PrintType = VBprinter.DGVprint.mytype.GZTPrint
        mydgvprint.AutoWrap = True '自动折行打印工资条
        mydgvprint.ReportFooterText = "这是打印完DGV后在尾部可以继续打印的内容，可以随便设置要打印的内容。"
        mydgvprint.ReportFooterSpace = 20 '
        mydgvprint.Print(D1, False)
        mydgvprint.Dispose()
        mydgvprint = Nothing
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim myp1 As New VBprinter.VB2008Print
        myp1.NewDoc()
        myp1.NewPage()
        myp1.PrintDGVgzt2(D1, "VB2008Print组件以自动换行的工资条打印方式打印DataGridView", New Font("黑体", 18, FontStyle.Bold), "", Nothing, "1111", 0, False, 10, False, True, 0, 0, False)
        myp1.EndDoc("自动折行工资条打印")
        myp1.Dispose()
        myp1 = Nothing
    End Sub

End Class