TabControlArray.Layout 事件


發生於控制項應重新調整其子控制項位置時。Occurs when a control should reposition its child controls.

 event System::Windows::Forms::LayoutEventHandler ^ Layout;
public event System.Windows.Forms.LayoutEventHandler Layout;
member this.Layout : System.Windows.Forms.LayoutEventHandler 
Public Event Layout As LayoutEventHandler 


當加入或移除子控制項、控制項的界限變更時,以及可能會影響控制項版面配置的其他變更時,就會發生 Layout 事件。The Layout event occurs when child controls are added or removed, when the bounds of the control changes, and when other changes occur that can affect the layout of the control. 您可以使用 SuspendLayoutResumeLayout 方法來隱藏版面配置事件。The layout event can be suppressed by using the SuspendLayout and ResumeLayout methods. 暫停配置可讓您在控制項上執行多個動作,而不需要針對每個變更執行配置。Suspending layout enables you to perform multiple actions on a control without having to perform a layout for each change. 例如,如果您調整控制項的大小並移動,則每個作業都會引發 Layout 事件。For example, if you resize and move a control, each operation would raise a Layout event.

如需如何處理事件的詳細資訊,請參閱處理和引發事件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.