Home All Groups Group Topic Archive Search About

Filling in web page through code...

Author
20 Sep 2006 8:32 PM
Kevin
I've got an app in VB6 that uses a webbrowser control to go to a web
site, enter text in a box, click the Submit button and fetch the
results.

Apparently the code won't translate to VB2005. The program stops on
this line:

WebBrowser1.Document.DomDocument.All("address1").Value = MyString

with the error "Object reference not set to an instance of an object"
and the Upgrade Warnings above the line of code show:

Couldn't resolve default property of object WebBrowser1.Document.All.

What is the correct syntax for this, or is there a better way of doing
this?

Author
20 Sep 2006 9:40 PM
GhostInAK
Hello Kevin,

Why don't you take a look at the webbrowser control's properties and then
come back if you cant figure it out.

-Boo

Show quoteHide quote
> I've got an app in VB6 that uses a webbrowser control to go to a web
> site, enter text in a box, click the Submit button and fetch the
> results.
>
> Apparently the code won't translate to VB2005. The program stops on
> this line:
>
> WebBrowser1.Document.DomDocument.All("address1").Value = MyString
>
> with the error "Object reference not set to an instance of an object"
> and the Upgrade Warnings above the line of code show:
>
> Couldn't resolve default property of object WebBrowser1.Document.All.
>
> What is the correct syntax for this, or is there a better way of doing
> this?
>
Author
21 Sep 2006 1:32 AM
Kevin
Boo,
Thanks for the response. I did figure it out. I wasn't waiting for the
WebBrowser1.DocumentComplete event. Everything's working fine once the
page loads.



On Wed, 20 Sep 2006 21:40:26 +0000 (UTC), GhostInAK
<ghosti***@gmail.com> wrote:

Show quoteHide quote
>Hello Kevin,
>
>Why don't you take a look at the webbrowser control's properties and then
>come back if you cant figure it out.
>
>-Boo
>
>> I've got an app in VB6 that uses a webbrowser control to go to a web
>> site, enter text in a box, click the Submit button and fetch the
>> results.
>>
>> Apparently the code won't translate to VB2005. The program stops on
>> this line:
>>
>> WebBrowser1.Document.DomDocument.All("address1").Value = MyString
>>
>> with the error "Object reference not set to an instance of an object"
>> and the Upgrade Warnings above the line of code show:
>>
>> Couldn't resolve default property of object WebBrowser1.Document.All.
>>
>> What is the correct syntax for this, or is there a better way of doing
>> this?
>>
>