HelpHandles without a control

Posts 1–3 of 3 · Page 1 of 1
Handles without a control
So, im having a bit of an issue. I wrote this, which works:
Code:
    Dim theList As New List(Of WebBrowser)
    Sub access(ByVal numTimes As UInteger)
        theList.Clear()
        For i As Integer = 0 To numTimes - 1
            theList.Add(New WebBrowser)
            theList(i).ScriptErrorsSuppressed = True
            theList(i).Navigate(command)
        Next
    End Sub
Now, that works with no problems. But, i want to add something to when the first document is completed.

Code:
sub naved() Handles theList(0).DocumentCompleted
' code on completion
end sub
The issue is that visual studios doesn't like that. Does anybody know a way i can make this work? I'd like to avoid using httpWebRequests if possible.
Code:
AddHandler theList(0).DocumentCompleted, AddressOf naved
(sub naved must have the same parameters like the event parameters)
Quote Originally Posted by Aly El-Haddad View Post
Code:
AddHandler theList(0).DocumentCompleted, AddressOf naved
(sub naved must have the same parameters like the event parameters)
thanks, that's exactly what i needed.
Posts 1–3 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Talk with us