I have embedded the PDF-XChange Viewer control on a form in a VB .NET application and have the problem that the built-in keyboard shortcuts does not work in the PDF-XChange Viewer control.
The only work if I click with the mouse on the command in the menu bar.
The PDF-XChange Viewer control receives the keyboard shortcuts e.g. CTRL + O but does not call the appropriate command e.g. Open(57601).
How can I connect all built-in shortcuts ot the PDF-XChange Viewer control with the appropriate commands?
Here is my code, where I am catching the shortcuts:
Code: Select all
Private Sub AxPDFXViewCtrl_OnEvent(sender As Object, e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles AxPDFXViewCtrl.OnEvent
Dim oDataIn As Object
Dim oDataOut As Object
If e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnNamedNotify And e.name = "Global::CheckKey" Or _
e.type = PDFXCviewAxLib.PXCVA_EventTypes.PXCVA_OnNamedNotify And e.name = "Global::CheckSysKey" Then
AxPDFXViewCtrl.DoVerb("Notifications.Keyboard", ".SP", oDataIn, oDataOut, 0)
Dim mKeyBoard As PDFXCviewAxLib.IPDFXCsmartp
mKeyBoard = CType(oDataOut, PDFXCviewAxLib.IPDFXCsmartp)
mKeyBoard.GetProperty("Msg", oDataOut, 0)
Debug.Print(oDataOut.ToString)
mKeyBoard.GetProperty("Code", oDataOut, 0)
Debug.Print(oDataOut.ToString)
mKeyBoard.GetProperty("RepCnt", oDataOut, 0)
Debug.Print(oDataOut.ToString)
mKeyBoard.GetProperty("Flags", oDataOut, 0)
Debug.Print(oDataOut.ToString)
End If
Thanks,
Karl