e.Graphics.DrawString(txtOriginal.Text, New Font("Courier New", 10, FontStyle.Regular), Brushes.Black, 50, 50)
after i debug it said "too many arguments to pulic sub new"(underline)
then i reduce but still same error.
Printable View
e.Graphics.DrawString(txtOriginal.Text, New Font("Courier New", 10, FontStyle.Regular), Brushes.Black, 50, 50)
after i debug it said "too many arguments to pulic sub new"(underline)
then i reduce but still same error.
This line looks fine. I tried itjst to make sure and it works fine. Can you show all the code for your public sub new?
Public Sub mPrint_Click(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles mPrint.Click
If txtOriginal.Text = "" Then
MsgBox("Error: Empty Original text file", MsgBoxStyle.Critical)
Else
PrintDocument1.Print()
End If
End Sub
Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles PrintDocument1.PrintPage
e.Graphics.DrawString(txtOriginal.Text, New Font("Courier New", 10, FontStyle.Regular), Brushes.Black, 50, 50)
End Sub
Whar version are you using? I copied and pasted your code into 2003 and 2005 and it works fine.
i found out the problem hehe anyway thanks