Example





In This Topic
GdPicture14 Namespace / GdViewer Class / AfterPrintPage Event

AfterPrintPage Event (GdViewer)

In This Topic
This event is raised right after a page has been successfully printed through the GdViewer control using one of the Print or PrintDialog methods.

Please check the corresponded GdViewer.AfterPrintPageEventHandler for given parameters.

Syntax
'Declaration
 
Public Event AfterPrintPage As GdViewer.AfterPrintPageEventHandler
public event GdViewer.AfterPrintPageEventHandler AfterPrintPage
public event AfterPrintPage: GdViewer.AfterPrintPageEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdViewer.AfterPrintPageEventHandler* AfterPrintPage
public:
event GdViewer.AfterPrintPageEventHandler^ AfterPrintPage
Example
How to add this event to your GdViewer control.
'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
            
'Add the event.
AddHandler GdViewer1.AfterPrintPage, AddressOf GdViewer1_AfterPrintPage
            
'Define the event.
Sub GdViewer1_AfterPrintPage(ByVal Page As Integer, ByVal PageLeft As Integer) Handles GdViewer1.AfterPrintPage
    MessageBox.Show("The page already printed: " + Page.ToString(), "GdViewer.AfterPrintPage")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
            
//Add the event.
GdViewer1.AfterPrintPage += GdViewer1_AfterPrintPage;
            
//Define the event.
void GdViewer1_AfterPrintPage(int Page, int PageLeft, ref bool Cancel)
{
    MessageBox.Show("The page already printed: " + Page.ToString(), "GdViewer.AfterPrintPage");
}
See Also