print in NT but not Wins98??

  • Thread starter Thread starter Cheung
  • Start date Start date
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.
 
I did that. I installed dotnetframework and also sp1 and sp2. also installed mdac because the application uses MS Access as a db. What else I need to install on the 98/Me machine?
Thank you.
 
Back
Top