问题描述
vb.net打印实例
解决方案
解决方案二:
什么呀?你是求打印代码吗?
解决方案三:
http://www.codesoso.com/code/Text-Image-Print.aspx
解决方案四:
PrivateSub打印Button_Click(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)Handles打印Button.ClickMe.printPreviewDialog1.Document=Me.printDocument1Me.printPreviewDialog1.ShowDialog()EndSubPrivateSubprintDocument1_PrintPage(ByValsenderAsSystem.Object,ByValeAsSystem.Drawing.Printing.PrintPageEventArgs)HandlesprintDocument1.PrintPageIf(Me.帐单类型ComboBox.Text="旅客结帐单")ThenDimMyAmountAsDouble=Convert.ToDouble(Me.帐单DataGridView.CurrentRow.Cells(11).Value.ToString())-Convert.ToDouble(Me.帐单DataGridView.CurrentRow.Cells(12).Value.ToString())DimMyAmountInfoAsString="实收金额:"+MyAmount.ToString()If(MyAmount<0)ThenMyAmountInfo="实补金额:"+MyAmount.ToString().Remove(0,1)EndIfMe.帐单DataGridView.CurrentRow.Cells(2).Value.ToString()'打印旅客结帐单e.Graphics.DrawString(Me.MyCompany+"旅客结帐单",NewFont("宋体",20),Brushes.Black,220,80)EndIfEndSub