Question Checkbox Checker!

Chloe

New member
Joined
Nov 27, 2008
Messages
3
Programming Experience
Beginner
Hi All, ;)

I was wondering if i would be able to create a checkbox checker usign VB!

All I want is a small form that has one button and when you click the button it will check all the chekboxes on the webpage that I am viewing?

Is this possible?!

Thanks guys,
Chloe ~X~
 
Yes, this is very easy to do, add a WebBrowser control to your form and Navigate it to the address. In a button/menu click you get all input elements from the document and see that they are checkbox types, then set the checked attribute. Sample:
VB.NET:
For Each input As HtmlElement In Me.WebBrowser1.Document.GetElementsByTagName("input")
    If input.GetAttribute("type") = "checkbox" Then
        input.SetAttribute("checked", "true")
    End If
Next
 
Back
Top