in some cases the control hangs when you call Flushdocument (and maybe other commands) within the OnEvent handler. This happened when I tried to catch the keypress of CTRL+S and call the save-method (and there of course the FlushDocument).
Code: Select all
Private Sub PDFViewerEvent(ByVal sender As Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles _PDFViewer.OnEvent
If e.name.ToLower.Contains("notifications.keyboard") Then
Dim Code As Integer
Try
_PDFViewer.GetProperty("Notifications.Keyboard.Code", Code, 0)
'STRG+S gedrückt
If Code = 19 Then
RaiseEvent CtrlSPressed()
End If
Catch
End Try
End If
This code can kill the control too:
Code: Select all
Private Sub PDFViewerEvent(ByVal sender As Object, ByVal e As AxPDFXCviewAxLib._IPDFXCviewEvents_OnEventEvent) Handles _PDFViewer.OnEvent
_PDFViewer.FlushDocument(0)
Control Version 2.5.0199
Sebastian