Export (0) Print
Expand All

ContainerControl.Validate Method (Boolean)

Note: This method is new in the .NET Framework version 2.0.

Verifies the value of the control that is losing focus; conditionally dependent on whether automatic validation is turned on.

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in system.windows.forms.dll)

'Declaration
Public Function Validate ( _
	checkAutoValidate As Boolean _
) As Boolean
'Usage
Dim instance As ContainerControl
Dim checkAutoValidate As Boolean
Dim returnValue As Boolean

returnValue = instance.Validate(checkAutoValidate)
public boolean Validate (
	boolean checkAutoValidate
)
public function Validate (
	checkAutoValidate : boolean
) : boolean

Parameters

checkAutoValidate

If true, the value of the AutoValidate property is used to determine if validation should be performed; if false, validation is unconditionally performed.

Return Value

true if validation is successful; otherwise, false.

The Validate method validates the last child control that is not validated and its ancestors up through, but not including, the current container control. This overloaded version performs validation based on the following conditions:

  • If the checkAutoValidate parameter is false, validation always occurs for child controls that are not validated.

  • If the checkAutoValidate parameter is false, validation occurs only if the AutoValidate property of the control's parent is enabled.

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2014 Microsoft