navigateofmplte2未在vb.net中定义 [英] navigatecomplte2 not defined in vb.net

查看:61
本文介绍了navigateofmplte2未在vb.net中定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试在vb.net中的网络浏览器控件中打开一个单词doccument时,我收到以下错误消息。我使用了msdn网站中给出的代码





http://support.microsoft.com/kb/304643/en-us







http://support.microsoft.com/kb/304643/en -us [ ^ ]















643 / zh-CN> http://support.microsoft.com/kb/304643/en-us [ ^ ]





Private Sub WebBrowser1_NavigateComplete2(ByVal sender As System.Object,ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event)句柄



'获取对已启用的单词app的引用ned

Dim oDocument As Object = e.pDisp.Document

'注意:您可以使用对文档对象的引用来自动化文档。

MsgBox(文件打开:& oDocument.Application.Name)

结束子





错误1类型'AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event'不是定义。









请帮忙......

解决方案

 私人  Sub  AxWebBrowser1_NavigateComplete2(发件人作为 对象,e 正如 AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event)句柄 AxWebBrowser1.NavigateComplete2 
Parent.Text = AxWebBrowser1.LocationName
TextBoxX1.Text = AxWebBrowser1.LocationURL
Form1.Text = AxWebBrowser1.LocationName
结束 Sub

<大>


i get the following error message when i try to reffer to a word doccument open in web browser control in vb.net..i have used the code given in msdn website


http://support.microsoft.com/kb/304643/en-us



http://support.microsoft.com/kb/304643/en-us[^]







643/en-us">http://support.microsoft.com/kb/304643/en-us[^]


Private Sub WebBrowser1_NavigateComplete2(ByVal sender As System.Object, ByVal e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) Handles

' get a reference to the word app that has opened
Dim oDocument As Object = e.pDisp.Document
'Note: You can use the reference to the document object to automate the document.
MsgBox("File opened by: " & oDocument.Application.Name)
End Sub


Error 1 Type 'AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event' is not defined.




please help......

解决方案

Private Sub AxWebBrowser1_NavigateComplete2(sender As Object, e As AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event) Handles AxWebBrowser1.NavigateComplete2
        Parent.Text = AxWebBrowser1.LocationName
        TextBoxX1.Text = AxWebBrowser1.LocationURL
        Form1.Text = AxWebBrowser1.LocationName
    End Sub


这篇关于navigateofmplte2未在vb.net中定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆