Invoker method problem

This worked in beta1:

Public sub UpdateMSL()
Try
Dim mi as MethodInvoker = New MethodInvoker(AddressOf UpdateMainStatusDisplay)
gui.BeginInvoke(mi)
catch....
End Try

Getting a "NullReferenceException" error pointing to "(mi)" on the gui... line
"UpdateMain..." is a public sub on the main window on the program

This sub is in a class which run ina separate thread from the main form. It job to call the public prgram to display information on the main form while the sub thread is running.

Most thankfull on any help on this.

[567 byte] By [jlcjlee] at [2008-1-23]
# 1
Additional info:
In my immediate windows I'm getting two errors that display serveral times:

"A first chance exception of type 'system.io.filenotfoundexception' occured in microsoft.visualbasic.dll"

and

"A first chance exception of type 'system.Nullreferenceexception' occured in testprogram.exe"

jlcjlee at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic Language...
# 2

Where do you declare and create the object 'gui'? My guess it that it is not pointing to an object, hence the NullRefererenceException.

You need to post more code so that we can diagnose the error.

DavidM.Kean at 2007-8-21 > top of Msdn Tech,Visual Basic,Visual Basic Language...