资讯

精准传达 • 有效沟通

从品牌网站建设到网络营销策划,从策略到执行的一站式服务

vb.net直接打印 vbs打印

vb.net如何实现打印整个panel的内容(打印机打印)

使用jquery.print插件

创新互联公司服务项目包括天津网站建设、天津网站制作、天津网页制作以及天津网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,天津网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到天津省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

我用得jQuery.print, version 1.3.2。

页面上调用代码如下:PrintArea就是你panel的ID....

script src="~/Scripts/jQuery.print.js"/script

script

function printarea() {

$("#PrintArea").print({

globalStyles: true,

mediaPrint: false,

stylesheet: null,

noPrintSelector: ".no-print",

iframe: true,

append: null,

prepend: null,

manuallyCopyFormValues: true,

deferred: $.Deferred()

});

}

/script

a class="btn btn-success" onclick="printarea()"打印/a

vb.net 打印功能

可以把数据导出到EXCEL,然后使用EXCEL进一步处理后使用。

也可以做成vb报表(VB自带有)。

先设置报表格式,打印时向报表传递数据就可以了。

VB.NET 打印问题。

先拖过来控件PrintDocument1,然后双击PrintDocument1,在它的PrintPage事件中加入代码如下:

Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

dim a as String

a="abcd"

Dim mypen As Pen = New Pen(Color.Blue, 2)

e.Graphics.DrawString(a, New Font("宋体", 20), New Pen(Color.Black, 1).Brush, 30, 30)

End Sub

调用下面语句可直接用默认打印机打印出来:

PrintDocument1.Print()

VB.NET怎么实现打印功能啊 呜呜(

利用 printdocument控件

Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click

PrintDocument1.Print()

End Sub

Private Sub PrintDocument1_PrintPage(sender As System.Object, e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage

Dim stringFont As New Font("Arial", 16)

Dim rectDraw As New RectangleF(e.MarginBounds.Left, e.MarginBounds.Top, e.MarginBounds.Width, e.MarginBounds.Height)

Dim strFormat As New StringFormat

Dim s As String

s = "print word" '打印的内容

e.Graphics.DrawString(s, stringFont, Brushes.AliceBlue, rectDraw, strFormat)

End Sub


网站名称:vb.net直接打印 vbs打印
文章分享:http://cdkjz.cn/article/dohhcos.html
多年建站经验

多一份参考,总有益处

联系快上网,免费获得专属《策划方案》及报价

咨询相关问题或预约面谈,可以通过以下方式与我们联系

业务热线:400-028-6601 / 大客户专线   成都:13518219792   座机:028-86922220