'フォームクラス Imports System.Windows.Forms Public Class Form1 Dim cwb As New cWebBrowser Private Sub Button1_Click _ (ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim stURL As String = Me.TextBox1.Text Try Call cwb.WWWNavigate(WebBrowser1, stURL) Catch MessageBox.Show(e.ToString()) End Try End Sub End Class
'cWebBrowserクラス Private done As Boolean = False Public Class cWebBrowser Private done As Boolean = False Public Sub WWWNavigate(ByVal wb As WebBrowser, ByVal cinURL As String) wb.Navigate(cinURL) While done = False Application.DoEvents() End While End Sub End Class