This topic shows how to draw a horizontal line in the C1PrintDocument. Complete the following steps:
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
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() |
To write code in C#
C# |
Copy Code
|
---|---|
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(); |
Your document will appear similar to the document below: