Change Visibility of HTML Element at WinForms Application (VB .Net)
vblover programmer

vblover programmer @vblover_programmer

About: I study and learn Visual basic programming language

Joined:
Aug 16, 2024

Change Visibility of HTML Element at WinForms Application (VB .Net)

Publish Date: Aug 17 '24
0 0

Hi there....

This is an Extension method to change the display of the HTML Element in
Windows Forms Applications:

References:
  1. Microsoft.mshtml
  2. System.Windows.Forms
Method:
 <Extension()>
    Public Sub SetVisibility(Element As HtmlElement, value As Boolean)
        With DirectCast(Element.DomElement, mshtml.IHTMLElement).style
            .display = If(value, "", "none")
        End With
    End Sub
Enter fullscreen mode Exit fullscreen mode
I hope will be useful....

Comments 0 total

    Add comment