WebBrowser Focus?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



I am using the WebBrowser control in a VB6 application. Now suppose I
navigate to a website & start typing some text in a TextArea. While
typing, I go to some other application & then come back to the browser.
Under such circumstances what happens is though the focus was on the
TextArea when the browser lost focus, when the browser gets back the
focus, the cursor is not in the TextArea. To continue typing, I have to
set the focus on the TextArea (either by clicking the mouse or by using
Tab) & then only can I continue typing.

Or for example, I am viewing a web page & scrolling up & down using the
Up/Down arrow keys on the keyboard. In between I start working with
some other application. When I come back to the browser i.e. the
browser gets the focus, pressing the Up/Down arrow keys doesn't scroll
the page. To scroll the page, I have to either click somewhere on the
web page so that it gets the focus or use the scrollbar with the mouse.

But IE doesn't exhibit these 2 phenomena. In IE, suppose I am typing
some text in a TextArea & in between I start working with another
application. When I revert back to IE i.e. when IE gets the focus, the
cursor can still be seen blinking in the TextArea.

The bottomline is once my browser loses focus, simply going back to the
browser window doesn't set the focus on the browser. To set the focus,
one has to click the mouse or use Tab or use the scrollbar with the
mouse to make the browser get the focus back.

How do I make my browser behave like IE? I tried using
WebBrowser1.SetFocus in the browser's GotFocus event function but that
doesn't resolve the issue.

This might be a petty problem but it can be highly annoying &
irritating especially for people (like me) who hardly use the mouse &
mostly rely on the keyboard to carry out their daily computer work.

Thanks,

Arpan

.



Relevant Pages

  • Re: WebBrowser Focus?
    ... > navigate to a website & start typing some text in a TextArea. ... > typing, I go to some other application & then come back to the browser. ... To scroll the page, I have to either click somewhere on the ...
    (microsoft.public.vb.general.discussion)
  • Re: textarea
    ... lines of data from a log file. ... xmlhttprequest and are "stored in a textarea". ... Do you mean presented in the browser? ... scroll the window to, effectively, the top of the textarea. ...
    (comp.lang.javascript)
  • Re: Address Box Issue Explorer 7
    ... into my browser address box. ... I might add that I took the router to work and could access the setup ... What could be blocking my ability to accessing these settings by typing the ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: New MSDN MFC/ATL Forum
    ... I'm left with vision problems, reading and typing (at least proofreading my typing, which ... GOOGLE CHROME was the first browser not to offer the user the option ...
    (microsoft.public.vc.mfc)
  • Two problems: drag-n-drop and window replacement after sending form
    ... These are also a slightly more complicated tasks, so I don't blame you if ... I have iframe with a file list on a page and a textarea. ... I would like the browser ...
    (alt.html)