VB打印控件,经典实用,

所需积分/C币:17 2013-07-29 12:55:47 2.88MB RAR
41
收藏 收藏
举报

Private Sub Image5_Click() '打印报表 Dim i As Integer Dim pageleft As Integer Dim pageheader As Integer Dim pagefooter As Integer Dim pageright As Integer Dim startx As Integer Dim starty As Integer Dim startline As Integer Dim endline As Integer Dim usewidth As Integer Dim useheight As Integer pageheader = 25 pagefooter = 25 pageleft = 20 pageright = 20 '定义纸张类型A4 Printer.FontSize = 20 Printer.PaperSize = 9 Printer.ScaleMode = 6 Printer.FontBold = False Printer.ScaleLeft = -20 Printer.ScaleTop = -25 Printer.ScaleWidth = 210 Printer.ScaleHeight = 297 usewidth = Printer.ScaleWidth - 40 useheight = Printer.ScaleHeight - 50 Printer.CurrentX = 0 Printer.CurrentY = 0 Printer.DrawWidth = 2 '打印主标题 Printer.FontSize = 20 Printer.CurrentX = (usewidth - Printer.TextWidth(Me.Text1.Text & "经济情况表")) / 2 Printer.CurrentY = Printer.ScaleTop Printer.Print Me.Text1.Text & "经济情况表" '打印空白行 Printer.FontSize = 8 Printer.CurrentX = (usewidth - Printer.TextWidth("")) / 2 Printer.CurrentY = Printer.CurrentY + 1 Printer.Print "" '打印副标题 Printer.FontSize = 15 Printer.CurrentX = (usewidth - Printer.TextWidth(commonth & "月份经济情况报表")) / 2 Printer.CurrentY = Printer.CurrentY + 1 Printer.Print commonth & "月份经济情况报表" '打印空白行 Printer.FontSize = 8 Printer.CurrentX = (usewidth - Printer.TextWidth("")) / 2 Printer.CurrentY = Printer.CurrentY + 1 Printer.Print "" '打印表的内容 '首先

...展开详情
立即下载
限时抽奖 低至0.43元/次
身份认证后 购VIP低至7折
一个资源只可评论一次,评论内容不能少于5个字
您会向同学/朋友/同事推荐我们的CSDN下载吗?
谢谢参与!您的真实评价是我们改进的动力~
上传资源赚钱or赚积分
最新推荐
VB打印控件,经典实用, 17积分/C币 立即下载
1/0