Imports System.Runtime.InteropServices Public Class Form1 Private Sub WebBrowser1_DocumentCompleted(ByVal sender As System.Object, ByVal e As System.Windows.Forms.WebBrowserDocumentCompletedEventArgs) Handles WebBrowser1.DocumentCompleted ToolStripStatusLabel1.Text = "ページを読み込みました。" 'UAの設定 Const URLMON_OPTION_USERAGENT As Integer = &H10000001 'ここに設定したいUser-Agentをセットする。 Dim UserAgent As String = "Visual Basic Junior High School User-Agent" UrlMkSetSessionOption(URLMON_OPTION_USERAGENT, UserAgent, UserAgent.Length, 0) End Sub End Class