我在 VS 2010 中使用项目模板构建了一个简单的 InteropForms 类。它构建成功并在系统中注册了库。我可以在 VB6 中看到并引用它,但是我在 VS2010 中添加到类中的公共方法或属性都不可见。
我究竟做错了什么?
Imports Microsoft.InteropFormTools
<InteropForm()> _
Public Class frmWebBrowserPreview
Private Sub frmWebBrowserPreview_KeyUp(sender As System.Object, e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyUp
If e.KeyCode = Windows.Forms.Keys.Escape Then Hide()
End Sub
Private Sub frmWebBrowserPreview_MouseUp(sender As System.Object, e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseUp
Hide()
End Sub
Private Sub wbrPreview_DocumentCompleted(sender As Object, e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles wbrPreview.DocumentCompleted
wbrPreview.Visible = True
End Sub
''' <summary>
''' Navigate to the specified URL
''' </summary>
''' <param name="strURL">The URL string</param>
Public Function Navigate(strURL As String) As Boolean
wbrPreview.Navigate(strURL)
End Function
End Class