Results 1 to 5 of 5

Thread: vb.net help

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    19

    vb.net help

    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.

  2. #2
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: vb.net help

    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?
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    19

    Re: vb.net help

    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

  4. #4
    Frenzied Member
    Join Date
    Jul 2005
    Posts
    1,521

    Re: vb.net help

    Whar version are you using? I copied and pasted your code into 2003 and 2005 and it works fine.
    Visual Studio Team Edition 2005
    GDI+ Links: Bob Powell VB.Net Heaven
    API Links: All API Pinvoke.Net
    VB6 to VB.Net: Visual Basic 6 to .NET Function Equivalents (Thread)

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Mar 2006
    Posts
    19

    Re: vb.net help

    i found out the problem hehe anyway thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width