Hi,
We use your ActiveX viewer as an embedded viewer. When a user selects a file from a list, the viewer displays the file. This works great, but we have an annoying usability problem: If the user right-clicks a new file in the list, the list item in our list gets selected, and at the same time a context menu opens up. On the background, the ActiveX viewer control begins to load the file. When the file opens in the viewer, something happens that makes the context menu disappear. This is annoying to the user.
This only seems to happen when the viewer control is created AND a file is opened. Subsequent closing and opening of a second file won't cause the context menu to disappear.
Is there something specific that the ActiveX control does when the first document is opened? E.g., does it explicitly set focus to itself, get mouse capture, or similar? Is it something that could be avoided with a reasonable change to the ActiveX control in the next builds? Or, even better, something we could already achieve by doing something differently?
-Antti
ActiveX viewer makes a context menu disappear when document
Moderators: PDF-XChange Support, Daniel - PDF-XChange, Chris - PDF-XChange, Sean - PDF-XChange, Vasyl - PDF-XChange, Ivan - Tracker Software, Stefan - PDF-XChange
-
- User
- Posts: 11
- Joined: Thu Jan 26, 2012 6:29 pm
-
- Site Admin
- Posts: 19913
- Joined: Mon Jan 12, 2009 8:07 am
Re: ActiveX viewer makes a context menu disappear when docum
Hello Antti,
I believe that the easiest solution would be to check where the selection comes from, and if it is from a left mouse click or e.g. a keyboard input - then to load the selected file, but if this comes from a right mouse click - just display the context menu and do not ask our Viewer AX to load the file.
Otherwise yes - the Viewer will capture all keyboard and mouse input while it is the active component but there are quite a few samples for handling user input and ignoring some Viewer commands in the SDK manual and sample projects so please take a look at those as well.
Best,
Stefan
I believe that the easiest solution would be to check where the selection comes from, and if it is from a left mouse click or e.g. a keyboard input - then to load the selected file, but if this comes from a right mouse click - just display the context menu and do not ask our Viewer AX to load the file.
Otherwise yes - the Viewer will capture all keyboard and mouse input while it is the active component but there are quite a few samples for handling user input and ignoring some Viewer commands in the SDK manual and sample projects so please take a look at those as well.
Best,
Stefan