Outlook intercept CTRL+C in a panel

Add-in Express™ Support Service
That's what is more important than anything else

Outlook intercept CTRL+C in a panel
 
Fabrice




Posts: 158
Joined: 2010-12-13
Hello,

First of all happy new year. I'm using ADX since many years and still happy (except I just read the no-go on .NET 6 ... but that's another subject :)).

I've a right docked panel that show a PDF using DevExpress pdf viewer.
When the user select text and use CTRL+C to copy, nothing happen.
I directly supected Outlook to intercept the key (rule #1: Outlook is always guilty ;)) so I searched and found the "OnKeyDown" event on AddinModule.

I suppose this is the way to go, but then how could I know that the currently selected control is my PDF viewer ? Otherwise I'll intercept all the CTRL+C which is not what I want.

Thank you
Fabrice
-------------
Posted 03 Jan, 2022 13:32:29 Top
Fabrice




Posts: 158
Joined: 2010-12-13
PS: I already tried to store a reference to my pdf preview. As I can have several openened preview, it must be dynamic and not static. I tried the standard GotFocus and LostFocus events (both on the control and on the ADXForm) to store this reference, but these events are also not triggered
-------------
Posted 03 Jan, 2022 13:40:25 Top
Andrei Smolin


Add-in Express team


Posts: 18183
Joined: 2006-05-11
Hello Fabrice,

Happy New Year!

Use the ADXOlForm.ADXKeyFilter event: check the shortcut pressed and set e.Action to ADXOlKeyFilterAction.SendToForm or ADXOlKeyFilterAction.SendToHostApplication.

Regards from Poland (CET),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2022 04:59:24 Top
Fabrice




Posts: 158
Joined: 2010-12-13
That works perfectly, thank you!

Fabrice
-------------
Posted 04 Jan, 2022 11:39:58 Top
Andrei Smolin


Add-in Express team


Posts: 18183
Joined: 2006-05-11
Great! Yours is the very first issue solved successfully in this year! Congratulations!

Regards from Poland (CET),

Andrei Smolin
Add-in Express Team Leader
Posted 04 Jan, 2022 13:07:26 Top