Partager via


ControlsValidator.SetControlError Method

Sets an error for an internally-managed control or a delegate-managed control. This method supports the Configuration Manager 2007 infrastructure and is not intended to be used directly from your code.

Namespace: Microsoft.ConfigurationManagement.AdminConsole
Assembly: Microsoft.ConfigurationManagement (in microsoft.configurationmanagement.dll)

Usage

'Usage
Dim instance As ControlsValidator
Dim control As Control
Dim errorString As String

instance.SetControlError(control, errorString)

Syntax

'Declaration
Public Sub SetControlError ( _
    control As Control, _
    errorString As String _
)
public void SetControlError (
    Control control,
    string errorString
)
public:
void SetControlError (
    Control^ control, 
    String^ errorString
)
public void SetControlError (
    Control control, 
    String errorString
)
public function SetControlError (
    control : Control, 
    errorString : String
)

Parameters

  • control
    [in] System.Windows.Forms.Control object.
  • errorString
    [in] Error string.

Remarks

The supplied error message overrides the registered error message until the control is re-evaluated as valid. The error state of externally-managed controls is set to Error and the specified error message is displayed.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Server 2003, Windows Vista

Target Platforms

Windows Server 2003,Windows Vista

See Also

Reference

ControlsValidator Class
ControlsValidator Members
Microsoft.ConfigurationManagement.AdminConsole Namespace