Hi,

i have form with a text box that uses a AutoCompleteStringCollection for
auto completion.
Now if a new value (one not yet contained in the collection) is entered, the
new value should be added to the collection.

Sounds simple, but i often (not always) get a System.NullReferenceException:
with as Stack trace as follows:
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW
bei
System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop
bei System.Windows.Forms.Application.Run
bei FwO.Entry.MainClass.Main

and with that my application crashes.

Does anyone have any idea of what might cause this error and how i can
prevent it?

Thanks for any info./suggestion!

Regards,

Frank