PrintPage Call Event for redrawing

  • Thread starter Thread starter Manekurt
  • Start date Start date
M

Manekurt

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(sender As Object, e As
System.Drawing.Printing.PrintPageEventArgs)' 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_remito.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
 
Manekurt said:
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(sender As Object, e As
System.Drawing.Printing.PrintPageEventArgs)' 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_remito.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()
 
Tomb,
The .Print() method, prints the document, I need to redraw the document,
refresh the displayed previewd.

Thank you
 
Back
Top