Hi Armin,
Well I created my own ErrorProider like this....
Public Class MojoErrorProvider
Inherits System.Windows.Forms.ErrorProvider
#Region " Component Designer generated code "
Public Sub New(ByVal Container As System.ComponentModel.IContainer)
MyClass.New()
'Required for Windows.Forms Class Composition Designer support
Container.Add(Me)
End Sub
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Component overrides dispose to clean up the component list.
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()
components = New System.ComponentModel.Container
End Sub
#End Region
Private _errorList As New ArrayList
Private _activeControl As Control
Public Shadows Sub SetError(ByVal control As Control, ByVal value
As String)
If value = "" Then
If _errorList.Contains(control) Then
_errorList.Remove(control)
End If
Else
If Not _errorList.Contains(_errorList) Then
_errorList.Add(control)
End If
End If
MyBase.SetError(control, value)
End Sub
Public Shadows Sub SetError(ByVal value As String)
If _activeControl Is Nothing Then
Throw New Exception("Active control has not been set.")
End If
Call Me.SetError(_activeControl, value)
End Sub
Public Sub ClearError(ByVal control As Control)
If _errorList.Contains(control) Then
_errorList.Remove(control)
End If
MyBase.SetError(control, "")
End Sub
Public Sub ClearError()
If _activeControl Is Nothing Then
Throw New Exception("Active control has not been set.")
End If
Call Me.ClearError(_activeControl)
End Sub
Public Sub ClearAll()
For Each control As control In _errorList
MyBase.SetError(control, "")
Next
_errorList.Clear()
End Sub
Public Function HasErrors() As Boolean
Return _errorList.Count > 0
End Function
End Class
So now I have the functionality I wanted.
)
Thanks for helping me out!
M O J O