'We assume that the GdViewer1 control has been properly integrated.
Friend WithEvents GdViewer1 As GdPicture14.GdViewer
'Add the event.
AddHandler GdViewer1.BeforePrintPage, AddressOf GdViewer1_BeforePrintPage
'Define the event.
Sub GdViewer1_BeforePrintPage(ByVal Page As Integer, ByVal PageLeft As Integer) Handles GdViewer1.BeforePrintPage
MessageBox.Show("The page to be printed: " + Page.ToString(), "GdViewer.BeforePrintPage")
End Sub
//We assume that the GdViewer1 control has been properly integrated.
//Add the event.
GdViewer1.BeforePrintPage += GdViewer1_BeforePrintPage;
//Define the event.
void GdViewer1_BeforePrintPage(int Page, int PageLeft, ref bool Cancel)
{
MessageBox.Show("The page to be printed: " + Page.ToString(), "GdViewer.BeforePrintPage");
}