473,473 Members | 1,748 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

MSHTML - VB .Net 2003 - web pages not working

I am trying to use the Web Browser in a VB .Net windows application to host
external web sites. I have a problem when I try and capture one of the
document objects events.
I used the KB 311284 "How to handle...VB .Net". coied all the code into my
version of VS 2003.
The code contains "AddHandler..." code, when active
doesn't allow the textbox to recieve input, and the text links don't
navigate to the next URL.

When I comment out all the "AddHandler..." lines the browser acts as
expected but I don't have any way to trap for the document's events.

I've looked and looked on the Internet and MSDN and can't seem to find any
resolution.

What am I doing wrong here?

Thanks,
DK - Minneapolis
Nov 21 '05 #1
1 1517
DK,

This is again such a nice directly from C# translated sample, what has less
to do with VBNet.

Try this one (I added some things so watch typos it is not tested)

Open a new windows application project

In the toolbox rightclick and select add/Remove items

In the customize toolbox select Com and in that Microsoft Webbrowser

When that is in the toolbox drag it to your form (don't make it so small)

Drag also a button to your form.

Then add this code and you have a mini Webbrowser that catches the mshtml
documents in the arraylist

Private Documents as new Arraylist
'Because the documents can be frames
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Me.AxWebBrowser1.Navigate2("www.google.com")
End Sub
Private Sub AxWebBrowser1_DocumentComplete(ByVal sender As System.Object, _
ByVal e As AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent ) _
Handles AxWebBrowser1.DocumentComplete
Dim wb As SHDocVw.WebBrowser = _
DirectCast e.pDisp, SHDocVw.WebBrowser)
Documents.Add(wb.Document)
End Sub

I hope this helps a little bit?

Cor
Nov 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mark H | last post by:
Hi all, I've been scouring the net today looking for answers but have yet to find one. I hope someone can help me out. Here's my problem, I wrote a C# app that uses MSHTML to parse the DOM of...
0
by: Dave | last post by:
Is there a way to find the pixel hight of the HtmlDocument that is currently being edited by a MSHTML control (preferably in C#)? I have created a report building application that uses MSHTML as...
4
by: David Pendrey | last post by:
Hello all, I am using the WebBrowser control to browse a webpage containing frames and am having difficulties accessing the 'frames' property of a document object. Bellow is my code and the error...
0
by: Joergen Bech | last post by:
Trying to implement my own webforms designer to be hosted in a WinForms environment. Basically: I know that mshtml is used in the VS.Net 2003 WebForms designer, but the HTML behind the scenes is...
4
by: Lars-Erik Aabech | last post by:
Hi! I've been walking in extacy since reading the article about test automation with IE in the latest MSDN mag. (http://msdn.microsoft.com/msdnmag/issues/05/10/TestRun/default.aspx) After a...
0
by: Atara | last post by:
Our application was build with VS 2003. I have tried to run it on a computer with .Net 2.0 (but without .Net 1.1 , as it should be used) and I got the following error - ...
5
by: Jason | last post by:
Hi, I'm developing an HTML Editor Control using VB.Net 2003 for an application that used to use the DHTML Editor Control that is no longer supported. Well, it's been fun but I've hit a wall with...
2
by: JM | last post by:
Hi, I have created a windows application which uses Microsoft.mshtml.dll for displaying browser window in the application for showing html. When I am creating a setup program, I have to...
0
by: Vibhu | last post by:
Hi, I need to scrape aspx pages for data using MSHTML. I am fairly comfortable using MSHTML. I need to know as to how I can submit information to aspx pages and get the results.. Any help...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.