Results 1 to 2 of 2

Thread: [2008] Printing a Window Form

  1. #1

    Thread Starter
    Hyperactive Member Tarablue's Avatar
    Join Date
    Feb 2007
    Location
    Somewhere West of GMT
    Posts
    398

    [2008] Printing a Window Form

    Hello All,

    I have placed a PrintDocument item on my form and linked it to a Button.* To start with I just got a black page but after some seaching the forums for help I've managed to get the form to print out.* Great!!However to do this I had to duplicate ALL my code that creates the screen form into the PrintDocument1_PrintPage sub.

    Code:
    Private Sub PrintDocument1_PrintPage(ByVal sender As System.Object, _
                    ByVal e As System.Drawing.Printing.PrintPageEventArgs) _
                    Handles PrintDocument1.PrintPage
    
    All code placed here
        End Sub
    This seems a vast amount of duplication. I tried to 'CALL' the Private Sub for the code Call PictureBox1_Paint()but only received the error;

    "Argument not specified for parameter 'e' etc.

    Is it possible to print a form window another way?

    Rgds,
    Tarablue

  2. #2
    PowerPoster
    Join Date
    Jul 2002
    Location
    Dublin, Ireland
    Posts
    2,148

    Re: [2008] Printing a Window Form


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