AxAcroPDF control focus stealing prevention

The AxAcroPDF control takes focus when a PDF file is loaded into it.

To prevent this, the AxAcroPDF control is placed into a panel which is disabled prior to loading a pdf. This inturn disables the AxAcroPDF control preventing it from taking focus.

A mouse hook is used to check if the mouse has entered the area of the panel, in which case the panel is enabled to allow the user to interact with the AxAcroPDF control.

axacropdf_focus

 

VB.net Source: AxAcroPDF-Focus-Example.zip (1237 downloads)

6 thoughts on “AxAcroPDF control focus stealing prevention

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.