I am using your PDF-XChange Viewer in my VB .NET application and using always the latest version of PDF-XChange Viewer ActiveX SDK on my development PC. Our users have earlier versions of PDF-XChange Viewer ActiveX SDK installed on their computers and so I have the problem if I deploy my application to them it crashes because the COM-Wrapper is not the same version as mine.

To fix this problem I decided to late-bind the PDF-XChange Viewer control with Reflection-class and it works but I receive no event with GetEvent if I try to listen to OnEvent.
Here is how I tried it in a windows form application:
Code: Select all
'######## Listen to PDF-XChange Viewer-event OnEvent ###############################
Dim tPDFXCView As Type = Type.GetTypeFromProgID("PDFXCviewAx.CoPDFXCview")
Dim oPDFXCView As Object = Activator.CreateInstance(tPDFXCView)
oPDFXCView = Activator.CreateInstance(tPDFXCView)
Debug.WriteLine(tPDFXCView.GetEvents())
Dim evPDFXCOnEvent As EventInfo = tPDFXCView.GetEvent("OnEvent")
Debug.WriteLine(evPDFXCOnEvent)
'Returns Nothing
Code: Select all
'######## Listen to Word event DocumentChange ###############################
Dim tPDFXCView As Type = Type.GetTypeFromProgID("Word.Application")
Dim oPDFXCView As Object = Activator.CreateInstance(tPDFXCView)
oPDFXCView = Activator.CreateInstance(tPDFXCView)
Debug.WriteLine(tPDFXCView.GetEvents())
Dim evPDFXCOnEvent As EventInfo = tPDFXCView.GetEvent("DocumentChange")
Debug.WriteLine(evPDFXCOnEvent)
'Returns Microsoft.Office.Interop.Word.ApplicationEvents4_DocumentChangeEventHandler DocumentChange
Thanks a lot!
Karl