Monday, 26 June 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

casting - Why wasn't Tobey Maguire in The Amazing Spider-Man? - Movies & TV

In the Spider-Man franchise, Tobey Maguire is an outstanding performer as a Spider-Man and also reprised his role in the sequels Spider-Man...