TabControlArray.Deselecting 事件


發生於取消選取索引標籤以前,可讓處理常式取消索引標籤變更。Occurs before a tab is deselected, enabling a handler to cancel the tab change.

 event System::Windows::Forms::TabControlCancelEventHandler ^ Deselecting;
public event System.Windows.Forms.TabControlCancelEventHandler Deselecting;
member this.Deselecting : System.Windows.Forms.TabControlCancelEventHandler 
Public Custom Event Deselecting As TabControlCancelEventHandler 
Public Event Deselecting As TabControlCancelEventHandler 


當目前的索引標籤在 TabControl 中變更時,下列事件會依照下列順序發生。When the current tab changes in a TabControl, the following events occur in the following order.





這些事件可讓您執行如取消索引標籤變更的工作,例如,如果 TabPage 處於無效狀態,或更新新顯示 TabPage 的狀態。These events let you perform tasks such as canceling a tab change if a TabPage is in an invalid state or updating the state of a newly displayed TabPage.

當使用者按一下索引標籤、呼叫 DeselectTabSelectTab 方法,或是當您變更 SelectedIndexSelectedTab 屬性的值時,[目前] 索引標籤就會變更。The current tab changes when the user clicks a tab, when you call the DeselectTab or SelectTab method, or when you change the value of the SelectedIndex or SelectedTab property.

如需如何處理事件的詳細資訊,請參閱處理和引發事件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.NET Framework 的其他命名空間中可以找到的功能。In most cases, these functions and objects duplicate functionality that you can find in other namespaces in the .NET Framework.NET Framework. 只有當 Visual Basic 6.0 程式碼模型與 .NET Framework.NET Framework 實作有顯著差異時,才需要這些項目。They are necessary only when the Visual Basic 6.0 code model differs significantly from the .NET Framework.NET Framework implementation.