.Net程序在98下打印有很多BUG,把错误贴上来
解决方案 »
- .NET中Request传递参数为题
- 取这个字符串中指定字符串的个数
- System.Media引用不了
- 大家投票一下自己 在.NET中 如何实现对数据库的操作
- 如何在窗体失去焦点时自动关闭
- 请教:避免在条件语句中调用返回bool值的函数。可以使用局部变量并检查这些局部变量的原因
- 请教一个问题啊!!!
- 一个很简单的图片问题~~~~
- 简单问题:想从C#Winform中录入一条数据到库中,想先判断数据库中是否已存在此记录!判断程序怎么写!??!
- 遇到一个语法高亮显示的问题,怎么解决比较好?(附代码)richtextbox
- 如何让窗口运行后不要在系统栏和任务栏上显示。
- 武汉的爱好IT业的朋友请来转转:)给见面礼啦
}
catch(Exception e)
{
错误信息 = e.ToString();
}
download and apply it from the following location and see if it can resolve
the problem.
http://msdn.microsoft.com/netframework/downloads/updates/sp/default.asp If the problem still occurs and it only occurs in Win9x machines, you can
try the following code:
1. Create a class that inherits from PrintDocument as below:
Public Class MyDocument
Inherits System.Drawing.Printing.PrintDocument Private Wait As Boolean = True
Private Reset As Boolean Private priority As System.Threading.ThreadPriority Protected Overrides Sub OnBeginPrint(ByVal e As
System.Drawing.Printing.PrintEventArgs)
Wait = True
MyBase.OnBeginPrint(e) End Sub Protected Overrides Sub OnQueryPageSettings(ByVal e As
System.Drawing.Printing.QueryPageSettingsEventArgs)
If (Wait) Then
priority = System.Threading.Thread.CurrentThread.Priority
System.Threading.Thread.CurrentThread.Priority =
Threading.ThreadPriority.Lowest
System.Threading.Thread.Sleep(0)
Wait = False
Reset = True
Else
If (Reset) Then
System.Threading.Thread.CurrentThread.Priority = priority
Reset = False
End If
End If
MyBase.OnQueryPageSettings(e)
End Sub
End Class2. In your application, use the code similar to the following to print
preview:
Dim pd As New MyDocument()
PrintPreviewDialog1.Document = pd
PrintPreviewDialog1.ShowDialog()
我有微软专家提供的弥补BUG的程序。不过个别的打印机还是要发生异常,如惠普。
http://expert.csdn.net/Expert/topic/1788/1788577.xml?temp=.8955042
http://expert.csdn.net/Expert/topic/1643/1643345.xml?temp=4.383487E-02
然后就是经过其它途径了解到对特殊的打印机,有异常。