Yup - Set the KeyPreview property to true on the Form that hosts the
control and handle the key events in the form
  Andrew

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of John Warner
Sent: Friday, August 08, 2008 8:06 AM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: [Spam:***** SpamScore] Re: [ADVANCED-DOTNET] Webbrowser control
and backspace key problem
Importance: Low

Can you not capture the keystrokes at the form level and 'cancel' them
before they are bubbled to the control?

John Warner




> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of
> Peter Ritchie
> Sent: Friday, August 08, 2008 5:17 AM
> To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
> Subject: Re: [ADVANCED-DOTNET] Webbrowser control and
> backspace key problem
>
>
> You'd run into this problem with a number of controls--many
> controls do something specific with certain keystrokes.
>
> I would recommend setting the focus away from the browser
> control while in on-screen keyboard mode.  See the
> ActiveControl property on the form.
>
>
> On Fri, 8 Aug 2008 11:00:20 +0300, Seref Arikan
> <[EMAIL PROTECTED]> wrote:
>
> >Hi,
> >
> >I am developing a desktop app that'll run on a touch screen
> device, and
> >it has to provide access to a series of web pages. the users have to
> >use an on-screen keyboard to enter data to the web page.
> >
> >So I have to host webbrowser control, and users will need
> backspace key
> >to erase any mistyped data. The trouble is, webbrowser control
> >interprets backspace key as go back when focus is not in a
> textbox etc.
> >
> >I've seen a lot of tips, discussions etc, but none of them seems to
> >cover this simple scenario. How do I prevent webbrowser control from
> >going back due to a keypress from backspace key? I do not
> have control
> >over the displayed pages, so injecting a piece of javascript
> is not an
> >option. I'd really appreciate your comments, for I have lost a
> >ridiciolus amount of
> time
> >for such a little annoying problem!
>
> ===================================
> This list is hosted by DevelopMentorR  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com

View archives and manage your subscription(s) at
http://discuss.develop.com


-- 
BEGIN-ANTISPAM-VOTING-LINKS
------------------------------------------------------

Teach CanIt if this mail (ID 12312601) is spam:
Spam:
http://mail-gw.cognex.com/canit/b.php?c=s&i=12312601&m=c578ab8b04c9
Not spam:
http://mail-gw.cognex.com/canit/b.php?c=n&i=12312601&m=c578ab8b04c9
Forget vote:
http://mail-gw.cognex.com/canit/b.php?c=f&i=12312601&m=c578ab8b04c9
------------------------------------------------------
END-ANTISPAM-VOTING-LINKS

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to