Hello i have a problem.

I have a program which is supposed to download a file in a seperate thread, while the program checks file size. However i get this error when i try to debug (F5):

Object reference not set to an instance of an object.

Code: http://pastebin.com/7QkyJYf7

On which line do you get this error? Is it maybe on line 33 in this line of code:

Timer1.Interval = 100

It seems you didnt initialize a new timer. On form load (or in constructor) instanitate a new instance of a timer:

Dim Timer1 As New Timer()

atleast provide the exception statement
use try catch

On which line do you get this error? Is it maybe on line 33 in this line of code:

Timer1.Interval = 100

It seems you didnt initialize a new timer. On form load (or in constructor) instanitate a new instance of a timer:

Dim Timer1 As New Timer()

I made the timer in the form.

Where exactly do you get this error? Use a debugger (set a break point to check on whcich line error occurs.