ToolBarArray.Validating 事件

定義

發生於驗證控制項時。Occurs when the control is validating.

public:
 event System::ComponentModel::CancelEventHandler ^ Validating;
public event System.ComponentModel.CancelEventHandler Validating;
member this.Validating : System.ComponentModel.CancelEventHandler 
Public Custom Event Validating As CancelEventHandler 
Public Event Validating As CancelEventHandler 

事件類型

CancelEventHandler

備註

當您使用 [鍵盤 (] 索引標籤、[SHIFT + TAB]) ,或藉由 Select SelectNextControl 將屬性設定為目前的表單來變更焦點時 ActiveControl ,焦點事件會以下列順序發生:When you change the focus by using the keyboard (TAB, SHIFT+TAB, and so on), by calling the Select or SelectNextControl methods, or by setting the ActiveControl property to the current form, focus events occur in the following order:

Enter

GotFocus

Leave

Validating

Validated

LostFocus

當您使用滑鼠或藉由呼叫方法來變更焦點時 Focus ,焦點事件會以下列順序發生:When you change the focus by using the mouse or by calling the Focus method, focus events occur in the following order:

Enter

GotFocus

LostFocus

Leave

Validating

Validated

如果 CausesValidation 屬性設定為 falseValidating Validated 就會隱藏和事件。If the CausesValidation property is set to false, the Validating and Validated events are suppressed.

如果在 Cancel CancelEventArgs 事件委派中將的屬性設定為,則會 true Validating 隱藏事件之後通常會發生的所有事件 ValidatingIf the Cancel property of the CancelEventArgs is set to true in the Validating event delegate, all events that would usually occur after the Validating event are suppressed.

如需如何處理事件的詳細資訊,請參閱 處理和引發事件For more information about how to handle events, see Handling and Raising Events.

注意

Microsoft.VisualBasic.Compatibility.VB6 命名空間中的函式和物件都是供這些工具使用,以便從 Visual Basic 6.0 升級至 Visual Basic。Functions and objects in the Microsoft.VisualBasic.Compatibility.VB6 namespace are provided for use by the tools for upgrading from Visual Basic 6.0 to Visual Basic. 在大多數情況下,這些函式和物件會複製在 .NET Framework 其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework 實作有顯著差異時,才會需要這些函式和物件。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework implementation.

適用於

另請參閱