本文展示了如何在C1PrintDocument中绘制一条水平线。完整的步骤如下:
Visual Basic
Visual Basic |
拷贝代码
|
---|---|
Me.C1PrintDocument1.StartDoc() Dim rl As New C1.C1Preview.RenderLine(Me.C1PrintDocument1) rl.X = Me.C1PrintDocument1.PageLayout.PageSettings.Width Dim ld As New C1.C1Preview.LineDef("4mm", Color.SteelBlue) Me.C1PrintDocument1.RenderBlockHorzLine(rl.X, ld) Me.C1PrintDocument1.EndDoc() |
C#
C# |
拷贝代码
|
---|---|
this.c1PrintDocument1.StartDoc(); C1.C1Preview.RenderLine rl = new C1.C1Preview.RenderLine(this.c1PrintDocument1); rl.X = this.c1PrintDocument1.PageLayout.PageSettings.Width; C1.C1Preview.LineDef ld = new C1.C1Preview.LineDef("4mm", Color.SteelBlue); this.c1PrintDocument1.RenderBlockHorzLine(rl.X, ld); this.c1PrintDocument1.EndDoc(); |
你的文档看起来应该跟下图中的相似