AxAcroPDF swallows all key-related events as soon as it receives focus, including shortcuts, keystrokes, etc. I added a message filter, and it also does not receive any messages related to keys. This is a COM component, can it be relevant?
Is there a way to catch them before the control swallows them?
Hans is right, Acrobat Reader spawns two AcroRd32 child processes with which you do not have direct access from your managed code.
I experimented with this, and you have three viable options:
, / WM_SETFOCUS, AcroRd32. # , , : http://www.codeproject.com/KB/system/WilsonSystemGlobalHooks.aspx
, AcroRd32. , , , , .
PDF. . : .net PDF : http://www.codeproject.com/KB/applications/PDFViewerControl.aspx
. , , (, ):
DateTime _lastRenav = DateTime.MinValue; public Form1() { InitializeComponent(); listBox1.LostFocus += new EventHandler(listBox1_LostFocus); } private void listBox1_SelectedIndexChanged(object sender, EventArgs e) { axAcroPDF1.src = "sample.pdf"; //this will cause adobe to take away the focus _lastRenav = DateTime.Now; } void listBox1_LostFocus(object sender, EventArgs e) { //restores focus if it were the result of a listbox navigation if ((DateTime.Now - _lastRenav).TotalSeconds < 1) listBox1.Focus(); }
, , . .
, , ( acropdf ), ( ). .
, (acropdf) , ( )
AxAcroPDF_this.Enabled = False AxAcroPDF_this.src= m_src
, , 1 .
AxAcroPDF_this.Enabled = False
, , Windows, acropdf , , Windows ( ).
, , - . , , , .
COM , . Windows SDK, SetParent(). , acroread.exe , .
SetWindowsHookEx(), DLL WH_GETMESSAGE. ββDLL #.
, . , .
- , AxAcroPDF , . "" .
, AxAcroPDF GroupBox. PDF, , GroupBox Enabled False .
Source: https://habr.com/ru/post/1750789/More articles:Get selected webpage text in google chrome extension - javascriptΠ ΡΠ΅ΠΌ ΡΠ°Π·Π½ΠΈΡΠ° ΠΌΠ΅ΠΆΠ΄Ρ ΡΠΊΠ°Π·Π°ΡΠ΅Π»Π΅ΠΌ Π½Π° ΡΡΠ½ΠΊΡΠΈΡ ΠΈ ΡΠΊΠ°Π·Π°ΡΠ΅Π»Π΅ΠΌ Π½Π° ΡΡΠ½ΠΊΡΠΈΡ WINAPI? - c++is a decorator in python exactly the same as calling a function on a function? - pythonHow to disable a Menu control from a style in javascript? - asp.netquick search for a small image in a larger image - searchPython authentication by Google App Engine by API - pythonBeautiful (anti alias) Chinese character - javaHow to switch between 2 components in Ext JS BorderLayout region - extjsPHP: allow users to download .php files, how can I prevent them from starting? - securityExtJS 4: Π·Π°ΠΌΠ΅Π½ΠΈΡΠ΅ Π΄Π²Π° ΠΊΠΎΠΌΠΏΠΎΠ½Π΅Π½ΡΠ° Π² ΠΌΠ°ΡΡΠΈΠ²Π΅ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² Viewport ΠΏΠΎΡΠ»Π΅ Π½Π°ΠΆΠ°ΡΠΈΡ ΠΊΠ½ΠΎΠΏΠΊΠΈ - model-view-controllerAll Articles