
正文
vb.net打印文档 vbnet debugprint
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
vb.net 打印问题
可以将打印机默认打印设置改为黑白打印vb.net打印文档,如果打印对象是RGB配色vb.net打印文档,打印机驱动转换为CMYK颜色时vb.net打印文档,黑色都是由彩色墨水组成vb.net打印文档的
2.可以试一下图片从一个标准灰度图片格式化而来,这样图片自身只有黑白色,也许可以
相关问答
Q1: 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
Q2: vb.net Document_PrintPage打印多行文本
比如:
Private Sub Document_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs)
e.Graphics.DrawString(str0, New Font("Arial", 14, FontStyle.Regular), Brushes.Black, 50, 50)
e.Graphics.DrawString(A1, New Font("Arial", 10, FontStyle.Regular), Brushes.Black,50, 100)
e.Graphics.DrawString(A2, New Font("Arial", 10, FontStyle.Regular), Brushes.Black, 300,100)
e.Graphics.DrawString(A3, New Font("Arial", 10, FontStyle.Regular), Brushes.Black, 800,100)
也就是分次用不同坐标和不同的字体来打印各变量。画线用:
e.Graphics.DrawLine(BlackPen, x1, y1, x2, y2)。
具体坐标数值自己用尺量出,再换算。
Q3: 想把vb.net中的界面以打印word文档的样子打印,能保存成work文档也行,该怎么弄
没装打印机驱动或是默认打印机是Microsoft Office document image writtervb.net打印文档,那个是用来把文稿转换成图片vb.net打印文档的虚拟打印机vb.net打印文档,就会变成另存为tiff图片
Q4: 怎样用热敏打印机把vb.net窗体内文本框内容打印出来
用PrintForm控件,在Visual Basic PowerPacks项目列表中vb2008 SP1以后版本就有了,下面是代码
Imports System.Drawing.Printing
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'先设置打印页面的页边距
With Me.PrintForm1
Dim myMargins As New Margins '页边距设置信息是存放在这个Margins类型的对象中的
With myMargins '分别设置上下左右边距,
.Left = 12
.Right = 12
.Top = 12
.Bottom = 12
End With
.PrinterSettings.DefaultPageSettings.Margins = myMargins '把myMargins对象赋给PrintForm1的设置属性
End With
Me.Button1.Visible = False '这个是在打印的时候隐藏打印按钮
Me.PrintForm1.Form = Me '设置要打印的窗体
Me.PrintForm1.Print() '调用打印窗体方法
Me.Button1.Visible = True '再把隐藏的打印按钮显示出来
End Sub
vb.net打印文档的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于vbnet debugprint、vb.net打印文档的信息别忘了在本站进行查找喔。






