像这样的WebBrowser示例:
Private Sub Form4_Load(sender As Object, e As EventArgs) Handles Me.Load
WebBrowser1.Navigate("http://www.google.com")
End Sub
Public ReadOnly Property TargetFrameName As String
Private Sub WebBrowser1_Navigating(sender As Object, e As WebBrowserNavigatingEventArgs) Handles WebBrowser1.Navigating
'Me.TargetFrameName = TargetFrameName
Dim messageBoxVB As New System.Text.StringBuilder()
'MsgBox(e.TargetFrameName.ToString)
messageBoxVB.AppendFormat("{0} = {1}", "Url", e.Url)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "TargetFrameName", e.TargetFrameName)
messageBoxVB.AppendLine()
messageBoxVB.AppendFormat("{0} = {1}", "Cancel", e.Cancel)
messageBoxVB.AppendLine()
MessageBox.Show(messageBoxVB.ToString(), "Navigating Event")
End Sub
消息框显示:
Url= http://www.google.com
TargetFrameName=
Cancel= False
我的问题是为什么TargetFrameName
没有价值或名称?