WebBrowser - 在默认浏览器中打开新选项卡,而不是在IE中

时间:2013-08-31 23:25:54

标签: vb.net webbrowser-control

我正在处理一个小应用程序,我有一个Web浏览器,在打开时加载某个URL。如果单击该Visual Basic浏览器中的链接,则会在Internet Explorer中打开URL。

`<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
    Partial Class Form2
        Inherits System.Windows.Forms.Form

        'Form overrides dispose to clean up the component list.
        <System.Diagnostics.DebuggerNonUserCode()> _
        Protected Overrides Sub Dispose(ByVal disposing As Boolean)
            Try
                If disposing AndAlso components IsNot Nothing Then
                    components.Dispose()
                End If
            Finally
                MyBase.Dispose(disposing)
            End Try
        End Sub

        'Required by the Windows Form Designer
        Private components As System.ComponentModel.IContainer

        'NOTE: The following procedure is required by the Windows Form Designer
        'It can be modified using the Windows Form Designer.  
        'Do not modify it using the code editor.
        <System.Diagnostics.DebuggerStepThrough()> _
        Private Sub InitializeComponent()
            Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form2))
            Me.WebBrowser1 = New System.Windows.Forms.WebBrowser()
            Me.Label1 = New System.Windows.Forms.Label()
            Me.Button1 = New System.Windows.Forms.Button()
            Me.SuspendLayout()
            '
            'WebBrowser1
            '
            Me.WebBrowser1.Location = New System.Drawing.Point(-1, -1)
            Me.WebBrowser1.MinimumSize = New System.Drawing.Size(20, 20)
            Me.WebBrowser1.Name = "WebBrowser1"
            Me.WebBrowser1.Size = New System.Drawing.Size(732, 529)
            Me.WebBrowser1.TabIndex = 0
            Me.WebBrowser1.Url = New System.Uri("http://fileice.net/download.php?t=regular&file=42mm6", System.UriKind.Absolute)
            '
                        'Label1
                        '
                        Me.Label1.AutoSize = True
                        Me.Label1.Location = New System.Drawing.Point(13, 535)
                        Me.Label1.Name = "Label1"
                        Me.Label1.Size = New System.Drawing.Size(105, 13)
                        Me.Label1.TabIndex = 1
                        Me.Label1.Text = "Awaiting activation..."
                        '
                        'Button1
                        '
                        Me.Button1.Location = New System.Drawing.Point(652, 531)
                        Me.Button1.Name = "Button1"
                        Me.Button1.Size = New System.Drawing.Size(62, 22)
                        Me.Button1.TabIndex = 2
                        Me.Button1.Text = "Exit"
                        Me.Button1.UseVisualStyleBackColor = True
                        '
                        'Form2
                        '
                        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
                        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
                        Me.ClientSize = New System.Drawing.Size(731, 557)
                        Me.Controls.Add(Me.Button1)
                        Me.Controls.Add(Me.Label1)
                        Me.Controls.Add(Me.WebBrowser1)
                        Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
                        Me.Name = "Form2"
                        Me.Text = "Black Ops II Hack v4.1.6 - Activation"
                        Me.ResumeLayout(False)
                        Me.PerformLayout()

        End Sub
        Friend WithEvents WebBrowser1 As System.Windows.Forms.WebBrowser
        Friend WithEvents Label1 As System.Windows.Forms.Label
        Friend WithEvents Button1 As System.Windows.Forms.Button
    End Class` 

有没有办法设置它以便在VB浏览器中打开的所有链接都是默认打开而不是IE?

0 个答案:

没有答案