Public Class doubleline
    Private mycolor As Color = Color.Black
    Private Sub doubleline_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        Me.客户TableAdapter.Fill(Me.NorthwindDataSet.客户)
        D1.DataSource = Me.NorthwindDataSet.客户
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        myp.PageUnits = VBprinter.VB2008Print.PageExportUnit.CentiMeter
        myp.IsUseDoubleLine = gwxdoubleline.Checked
        myp.DoubleLineSpace = Val(TextBox1.Text)
        myp.OuterBorder = gwxouterborder.Checked
        myp.OuterBorderWidth = Val(TextBox2.Text)
        myp.OuterBorderColor = mycolor
        D1.GridColor = Color.Black
        myp.PaperLandscape = True
        myp.InvalidatePreview()
    End Sub

    Private Sub Button39_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button39.Click
        ColorDialog1.Color = mycolor
        If ColorDialog1.ShowDialog = Windows.Forms.DialogResult.OK Then
            mycolor = ColorDialog1.Color
        End If
    End Sub

    Private Sub myp_PrintDocument() Handles myp.PrintDocument
        myp.NewPage()
        myp.PrintDGV(D1, "表格主标题", New Font("黑体", 18, FontStyle.Bold), StringAlignment.Center, "1111", True, True, 6, True, True, 0, 0, True, Nothing)
        myp.DrawText("表格接下去再可以打印其他内容", New Font("宋体", 18), 0)
    End Sub
End Class