C
Cheung
Guest
Hi all,
question on printing again. The following code does the printing :
Private Sub PrintTExt(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawString(TextBox1.Text, New Font("Arial", 11, FontStyle.Regular), Brushes.Black, 120, 120)
ev.HasMorePages = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim printDoc As New PrintDocument()
AddHandler printDoc.PrintPage, AddressOf Me.PrintTExt
printDoc.Print()
Catch ex As Exception
MessageBox.Show("Sorry -- there is a problem printing", ex.ToString())
End Try
End Sub
It works well in my NT machine (the machine I wrote the coding). But it doesnt work in Wins98 and Me machines. A windows dialog saying execution erro with Ignore and Close buttons was pop up.
Is there any limitation for Wins98 machine to run vb.net windows application?
thanks.
question on printing again. The following code does the printing :
Private Sub PrintTExt(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
ev.Graphics.DrawString(TextBox1.Text, New Font("Arial", 11, FontStyle.Regular), Brushes.Black, 120, 120)
ev.HasMorePages = False
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim printDoc As New PrintDocument()
AddHandler printDoc.PrintPage, AddressOf Me.PrintTExt
printDoc.Print()
Catch ex As Exception
MessageBox.Show("Sorry -- there is a problem printing", ex.ToString())
End Try
End Sub
It works well in my NT machine (the machine I wrote the coding). But it doesnt work in Wins98 and Me machines. A windows dialog saying execution erro with Ignore and Close buttons was pop up.
Is there any limitation for Wins98 machine to run vb.net windows application?
thanks.