PrintPage Call Event for redrawing

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Manekurt

    #1

    PrintPage Call Event for redrawing


    Hello, I have a PrintDocument and PrintingPreview controls in a form. When
    the form is loaded, the PrintPage event of the PrintDocument, is raised when
    loaded and it previews the page. I need to call the event, when a button is
    pressed, but it gives me this error messege when typeing.


    Error 1 'Public Event PrintPage(sende r As Object, e As
    System.Drawing. Printing.PrintP ageEventArgs)' is an event, and cannot be
    called directly. Use a 'RaiseEvent' statement to raise an event.
    D:\DevIt\Dev\GS-E-Sales-2005 - Dev\mk_Reportes \mkgv2_prt_remi to.vb 2530 9
    GSGSales

    I need to do smething like this.

    ||
    PrintDocument.P rintPage
    ||

    Is there a way of doing this with the rise event whith the entire code in
    the form?

    thank you


  • tomb

    #2
    Re: PrintPage Call Event for redrawing

    Manekurt wrote:
    Hello, I have a PrintDocument and PrintingPreview controls in a form. When
    the form is loaded, the PrintPage event of the PrintDocument, is raised when
    loaded and it previews the page. I need to call the event, when a button is
    pressed, but it gives me this error messege when typeing.
    >
    >
    Error 1 'Public Event PrintPage(sende r As Object, e As
    System.Drawing. Printing.PrintP ageEventArgs)' is an event, and cannot be
    called directly. Use a 'RaiseEvent' statement to raise an event.
    D:\DevIt\Dev\GS-E-Sales-2005 - Dev\mk_Reportes \mkgv2_prt_remi to.vb 2530 9
    GSGSales
    >
    I need to do smething like this.
    >
    ||
    PrintDocument.P rintPage
    ||
    >
    Is there a way of doing this with the rise event whith the entire code in
    the form?
    >
    thank you
    >
    Try calling Print()

    Comment

    • Manekurt

      #3
      Re: PrintPage Call Event for redrawing

      Tomb,
      The .Print() method, prints the document, I need to redraw the document,
      refresh the displayed previewd.

      Thank you

      "tomb" <tomb@technetce nter.comescribi รณ en el mensaje
      news:YEBLh.1926 7$Wc.8085@bigne ws3.bellsouth.n et...
      Manekurt wrote:
      >Hello, I have a PrintDocument and PrintingPreview controls in a form.
      >When
      >the form is loaded, the PrintPage event of the PrintDocument, is raised
      >when
      >loaded and it previews the page. I need to call the event, when a button
      >is
      >pressed, but it gives me this error messege when typeing.
      >>
      >>
      >Error 1 'Public Event PrintPage(sende r As Object, e As
      >System.Drawing .Printing.Print PageEventArgs)' is an event, and cannot be
      >called directly. Use a 'RaiseEvent' statement to raise an event.
      >D:\DevIt\Dev\G S-E-Sales-2005 - Dev\mk_Reportes \mkgv2_prt_remi to.vb 2530 9
      >GSGSales
      >>
      >I need to do smething like this.
      >>
      >||
      >PrintDocument. PrintPage
      >||
      >>
      >Is there a way of doing this with the rise event whith the entire code in
      >the form?
      >>
      >thank you
      Try calling Print()
      >

      Comment

      Working...