'Add the event.
WithEvents gdpicturePDF As GdPicture14.GdPicturePDF
gdpicturePDF = New GdPicturePDF()
AddHandler gdpicturePDF.BeforePageOcr, AddressOf BeforePageOcr
'Define the event.
Sub BeforePageOcr(ByVal PageNo As Integer, ByRef Cancel As Boolean) Handles gdpicturePDF.BeforePageOcr
'Do your stuff here.
End Sub
//Add the event.
GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.BeforePageOcr += BeforePageOcr;
//Define the event.
void BeforePageOcr(int PageNo, ref bool Cancel)
{
//Do your stuff here.
}