I have an embedded Acrobat viewer in a C# winform application.
The viewer is in a tab page tabPage1
in a tab control
I use the code from this answer: (1)
CAcroAVDoc acroExchAVDoc;
CAcroPDDoc pdDoc;
void CreatePdfViewerAndOpenFile(string pdfFile)
{
short AV_DOC_VIEW = 2;
short PDUseBookmarks = 3;
short AVZoomFitWidth = 2;
Type AcroExch_AVDoc = Type.GetTypeFromProgID("AcroExch.AVDoc");
acroExchAVDoc = (Acrobat.CAcroAVDoc)Activator.CreateInstance(AcroExch_AVDoc);
bool ok = acroExchAVDoc.OpenInWindowEx(pdfFile, tabPage1.Handle.ToInt32(), AV_DOC_VIEW, -1, 0, PDUseBookmarks, AVZoomFitWidth, 0, 0, 0);
pdDoc = (CAcroPDDoc)acroExchAVDoc.GetPDDoc();
}
I want to force the viewer to capture the mouse wheel so the file scrolls.
When I switch to another window and back to the application, I find the tab page name focused, and the file doesn't scroll.
I use Adobe Acrobat DC. Is there a way to do this?