Home All Groups Group Topic Archive Search About

enter text to webbrowser modal popup window, possible

Author
22 Oct 2005 6:12 AM
mscir
I'm using a webbrowser control in VB6 to navigate to a page that has a
javascript popup window for username entry.

Is there any way to enter text to that window?

I tried watching for it in the WebBrowser1_NewWindow2 event but the
event never fires. I tried using FindWindow to locate a window with the
title text so I could use SendMessage, but the VB program stops dead in
its tracks when the window pops up, it acts like a modal window. Also
neither the main form or webbrowser lostfocus events fire when the
dialog pops up.

TIA,
Mike

Author
22 Oct 2005 7:01 AM
mscir
mscir wrote:

> I'm using a webbrowser control in VB6 to navigate to a page that has a
> javascript popup window for username entry.
> Is there any way to enter text to that window?
> I tried watching for it in the WebBrowser1_NewWindow2 event but the
> event never fires. I tried using FindWindow to locate a window with the
> title text so I could use SendMessage, but the VB program stops dead in
> its tracks when the window pops up, it acts like a modal window. Also
> neither the main form or webbrowser lostfocus events fire when the
> dialog pops up.
> TIA,
> Mike

I wrote a 2nd small VB app that is run using Shell, that watches for the
popup window, enteres text into the textbox and clicks the command
button, then closes itself, works great.
Author
22 Oct 2005 8:29 AM
J French
On Fri, 21 Oct 2005 23:12:04 -0700, mscir <ms***@yahoo.com> wrote:

>I'm using a webbrowser control in VB6 to navigate to a page that has a
>javascript popup window for username entry.
>
>Is there any way to enter text to that window?
>
>I tried watching for it in the WebBrowser1_NewWindow2 event but the
>event never fires. I tried using FindWindow to locate a window with the
>title text so I could use SendMessage, but the VB program stops dead in
>its tracks when the window pops up, it acts like a modal window. Also
>neither the main form or webbrowser lostfocus events fire when the
>dialog pops up.

Find out what 'URL' it sends after you've entered the data and
duplicate that