| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 2710 人关注过本帖
标题:vb.net控制直接打印程序
取消只看楼主 加入收藏
ziyouyu
Rank: 1
等 级:新手上路
帖 子:4
专家分:0
注 册:2008-3-12
收藏
 问题点数:0 回复次数:0 
vb.net控制直接打印程序
Private Sub pd_PrintPage(ByVal sender As Object, ByVal ev As Printing.PrintPageEventArgs)
        'Dim leftMargin As Single = ev.MarginBounds.Left
        Dim line1 As String = Trim(TextBox6.Text).Substring(0, 14)
        Dim line2 As String = TextBox6.Text.ToString.Substring(14, 5)
        ev.Graphics.DrawString(TextBox1.Text, printFont, Brushes.Black, xPos, yPos + 25, New StringFormat())
        ev.Graphics.DrawString(TextBox2.Text + TextBox8.Text, printFont, Brushes.Black, xPos, yPos + 65, New StringFormat())
        ev.Graphics.DrawString(TextBox3.Text + TextBox7.Text, printFont, Brushes.Black, xPos, yPos + 110, New StringFormat())
        ev.Graphics.DrawString(TextBox4.Text, printFont, Brushes.Black, xPos, yPos + 155, New StringFormat())
        ev.Graphics.DrawString(TextBox5.Text, printFont, Brushes.Black, xPos, yPos + 200, New StringFormat())
        ev.Graphics.DrawString(line1, printFont, Brushes.Black, xPos + 50, yPos + 240, New StringFormat())
        ev.Graphics.DrawString(line2, printFont, Brushes.Black, xPos - 70, yPos + 270, New StringFormat())
        ' Indicate that this is the last page to print.
        ev.HasMorePages = False
    End Sub
搜索更多相关主题的帖子: 打印 
2008-03-12 13:55
快速回复:vb.net控制直接打印程序
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.023338 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved