Thursday, 19 January 2017

.net - 'Object reference not set to an instance of an object error'

I keep getting an 'Object reference not set to an instance of an object' error when trying to navigate with Gecko. One of the suggestions is to use the New keyword. But where and why?




Dim wbGecko As New GeckoWebBrowser
Dim i As Integer = 0
For i = 0 To lstPosts.Count - 1
wbGecko.Navigate("http://websta.me" & lstPosts.Item(i))
Do
If Not (wbGecko.IsBusy) Then
MessageBox.Show("Hello World!")
End If
Exit Do

Loop
Exit For
Next

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...