I have written a custom ErrorProvider which adds some functionality to the existing ErrorProvider (sets control BackColor, ErrorCount etc). This was working find but now for some reason it falls over on the constructor:
_LoginErrorProvider = New ErrorLogErrorProvider(Me.components)
The error is a NullReferenceException which is caused by the fact that Me.components is Nothing. Can anyone shed any light on why a form’s components collection would be Nothing? The form seems to work fine in every other way!
when you add a component to the design surface it adds this in the InitializeComponent function
so just add this in your self.
or your
is being called before InitializeComponent