Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Outlook does not pass keyboard event to an OCX

Geek News

Outlook does not pass keyboard event to an OCX
ronnie[ at ]implicitweb.com 6/12/2006 7:52:37 PM
Hi,

I am developing an OCX that is to be embedded on an Outlook custom
form. I am running into an issue of not being able to receive keyboard
shortcuts events from Outlook such as: Ctrl-A, Ctrl-C Ctrl-V
(cut/paste) etc...

When I run the OCX (VB) outside Outlook, then everything is fine. But
once its embedded into Outlook we don't get these events. Apparently
Outlook does not pass those to the OCX control therefore we're unable
to process them. I get the same behavior even when I use standard
Microsoft OCX controls.

Does anybody have any idea how to force outlook to pass these shortcuts
to the OCX?

Thanks,

Ronnie

Re: Outlook does not pass keyboard event to an OCX
"Dmitry Streblechenko" <dmitry[ at ]dimastr.com> 6/12/2006 8:50:39 PM
You can set a global Windows keyboard hook for the current process
(SetWindowsHookEx), process all of the keyboard messages, and pass them to
your control or let Windows run the defaut processing depending on which
window the messages are being sent to.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

<ronnie[ at ]implicitweb.com> wrote in message
news:1150141957.907130.312270[ at ]f14g2000cwb.googlegroups.com...
[Quoted Text]
> Hi,
>
> I am developing an OCX that is to be embedded on an Outlook custom
> form. I am running into an issue of not being able to receive keyboard
> shortcuts events from Outlook such as: Ctrl-A, Ctrl-C Ctrl-V
> (cut/paste) etc...
>
> When I run the OCX (VB) outside Outlook, then everything is fine. But
> once its embedded into Outlook we don't get these events. Apparently
> Outlook does not pass those to the OCX control therefore we're unable
> to process them. I get the same behavior even when I use standard
> Microsoft OCX controls.
>
> Does anybody have any idea how to force outlook to pass these shortcuts
> to the OCX?
>
> Thanks,
>
> Ronnie
>


Re: Outlook does not pass keyboard event to an OCX
ronnie[ at ]implicitweb.com 6/12/2006 10:09:15 PM
Thanks Dmitry,

Will try.

Ronnie

Dmitry Streblechenko wrote:
[Quoted Text]
> You can set a global Windows keyboard hook for the current process
> (SetWindowsHookEx), process all of the keyboard messages, and pass them to
> your control or let Windows run the defaut processing depending on which
> window the messages are being sent to.
>
> Dmitry Streblechenko (MVP)
> http://www.dimastr.com/
> OutlookSpy - Outlook, CDO
> and MAPI Developer Tool
>
> <ronnie[ at ]implicitweb.com> wrote in message
> news:1150141957.907130.312270[ at ]f14g2000cwb.googlegroups.com...
> > Hi,
> >
> > I am developing an OCX that is to be embedded on an Outlook custom
> > form. I am running into an issue of not being able to receive keyboard
> > shortcuts events from Outlook such as: Ctrl-A, Ctrl-C Ctrl-V
> > (cut/paste) etc...
> >
> > When I run the OCX (VB) outside Outlook, then everything is fine. But
> > once its embedded into Outlook we don't get these events. Apparently
> > Outlook does not pass those to the OCX control therefore we're unable
> > to process them. I get the same behavior even when I use standard
> > Microsoft OCX controls.
> >
> > Does anybody have any idea how to force outlook to pass these shortcuts
> > to the OCX?
> >
> > Thanks,
> >
> > Ronnie
> >

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net