all groups > dotnet interop > november 2004 >
You're in the

dotnet interop

group:

web broswer help please



web broswer help please Neil Stevens
11/27/2004 11:58:16 PM
dotnet interop: Hi,

I am developing a windows application which uses the browser control and
DHTML as the UI, i have designed a class that implements the
IDocHostUIHandler so that i can block the accelerator keys (F5, Ctrl+F5,
Ctrl+5, and so on), i have script that runs in pages that will be displayed
in the browser control and these scripts use the keyup and keydown events.

Now, the problem i have is that i am using TranslateAccelerator to block the
accelerator keys, but this is eating the keyup and keydown event because of
the return value. I actually need some of these key presses in the script
and would like to know if there is a way that i can fire these events (keyup
and keydown) from TranslateAccelerator before i return the return value.

Can anyone help me with this.
Thanks in advance
Neil

RE: web broswer help please Serg
11/28/2004 6:39:02 PM
try throwing from your event handler:

throw new COMException("", 1);

or

throw new COMException("", 0);

depending no whether or not you want IE to hanlde the pressed keys for you.



[quoted text, click to view]
AddThis Social Bookmark Button