none
Non aktifkan display gambar di webbrowse

Semua Balasan

  • pake Regex

    Imports System.Text.RegularExpressions
    Public Class Form1
    Private Sub ButtonGo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonGo.Click
            'Navigate to Address
            WebBrowser1.Navigate(TextBoxAddress.Text)
    End Sub
    Private Sub ButtonKillImages_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonKillImages.Click
        'Source String
        Dim origHTML As String
        origHTML = WebBrowser1.DocumentText
        'New String for Ouput
        Dim newHTML As String
        'The Regular Expression Object
        Dim regx As New Regex("<img.*/>")
        'Perform the RegEx action
        newHTML = regx.Replace(origHTML, "")
        'Load back into browser the new string
        WebBrowser1.DocumentText = newHTML
    End Sub
    End Class

    atau via registry

    ' Set Display Inline Images value to false
     Dim regkey As Microsoft.Win32.RegistryKey = _
     My.Computer.Registry.CurrentUser
     regkey.OpenSubKey("Software\Microsoft\Internet Explorer\Main", _
     True).SetValue("Display Inline Images", "no")

    tapi memang ga ada metode yang pasti untuk control diatas

    sepertinya karena tiap browser memiliki control yang berbeda


    23 Maret 2017 4:58