Capturing Ctrl-R

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

Capturing Ctrl-R
 
Esteban Astudillo


Guest


I added an ADXBuiltInControl control to my Addin using ID = 354 to handle the "Reply" event.

The code works OK when the user clicks the corresponding button in the toolbar (Reply button) or the equivalent menu option (Action / Reply), but the event is not triggered when the user types in the corresponding shortcut combination: Ctrl-R.

Is this supposed to work this way? If it's a different event, what can I do to handle the equivalent "Ctrl-R" event?

By the way, I noticed that I don't have associated to any toolbar all these built-in controls. Could this be the reason of my problem?

Thank you for any advice.
Posted 25 Apr, 2006 15:57:11 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Esteban.

Did you set the HandleShortcuts property of the addinmodule to True?
Posted 26 Apr, 2006 06:41:30 Top
Esteban Astudillo


Guest


I had no idea there was such an option. I will give it a try..

Is there any reason why I wouldn't want to use this option? (Like performance considerations, for example?)

Thanks!
Posted 26 Apr, 2006 13:51:57 Top
Eugene Starostin


Guest


Hello Esteban,

Did you set the HandleShortcuts property of the addinmodule to True?



Have a look at the add-in module properties.
Posted 26 Apr, 2006 13:57:49 Top
Esteban Astudillo


Guest


I enabled the option but it didn't have any effect. The "OnClick" event is not triggered when the user enters Ctrl+R.

Interestingly enough, the shortcut does work for the Alt+R combination though! This works regardless of the value of the HandleShortcuts property.

Any other idea how to do this? (meaning, how to capture the Ctrl+R combination)

Thanks in advance
Posted 26 Apr, 2006 14:00:15 Top
Esteban Astudillo


Guest


Hi Eugene,

Have a look at the add-in module properties.


I'm assuming you are referring to the PDF documentation. I'll take a look at it. Thanks!
Posted 26 Apr, 2006 14:03:49 Top
Esteban Astudillo


Guest


Hi Eugene,

The PDF documentation has no reference to the HandleShortcuts property. Where else did you mean to have a look at? Thanks again!
Posted 26 Apr, 2006 14:21:37 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Esteban.

I will send you an example with Ctrl+R combination in several minutes.
Posted 27 Apr, 2006 06:51:00 Top
Esteban Astudillo


Guest


Sergey,

Thank again for your sample code. It was really helpful.

I thought that somebody else could benefit of my experience and wanted to post it here. In your code sample your strategy was to add an Inspector toolbar with the name "Menu Bar" and a hidden button for each control (shortcut) I wanted to handle (like Ctrl+R).

I added two things to this example (it's working now):

1. The above technique only captures the event, but it doesn't trigger the expected action. For example, after Ctrl+R is preseed a new Inspector is supposed to show up. To do this, I jsut use the corresponding method (like item.Reply()) and then display the inspector window

2. I applied the same technique for handling the same shortcut in the Explorer window. For that, I created an explorer toolbar named "Standard" and added the same buttons.

Thanks again Sergey. ADX has the best support!
Posted 27 Apr, 2006 19:40:07 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Esteban.

To disable the standard action you can use the ADXBuiltInControl component as shown in my example.
Posted 29 Apr, 2006 09:33:23 Top