Follow Post Reply. Rabbit 12, Expert Mod 8TB. If Me. Almost but not quite, it's the tab number starting at 0. If you want the name, you will have to use the tab number to get it from the pages collection and then get the name from that. Rabbit: Me. Surely that returns a Page object Rabbit? I can't see how this can work.
Am I missing something? I'll admit the behavior is a bit odd. But if you MsgBox the control or Debug. Print it, it shows you a number, the number of the tab that is on top.
It works. I never would have guessed that, but I can't argue with the results. Thanks rabbit. Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support. Microsoft makes no warranties, express or implied, with respect to the information provided here. The following code example demonstrates the use of this member.
In the example, an event handler reports on the occurrence of the Selected event. This report helps you to learn when the event occurs and can assist you in debugging. To report on multiple events or on events that occur frequently, consider replacing MessageBox. Now if you see the code generated by the designer, you will notice the following code:. All controls of a TabPage are local to a Form and accessible from the Form without adding any additional functionality.
For example, the following code snippet sets PreferencePage as active tab:. View All. Windows 11 is Here. Read what is new in Windows Working with Windows TabControl with C. Mahesh Chand Updated date Mar 28, Next Recommended Reading. Windows 10 Vs Windows NET 5. Everything That Every. Need For Site Reliability Engineering. Net 5. Micro Frontends With Webpack. NET 6. Raises the MouseClick event.
Raises the MouseDoubleClick event. Raises the MouseDown event. Raises the MouseEnter event. Raises the MouseHover event. Raises the MouseLeave event. Raises the MouseMove event. Raises the MouseUp event. Raises the MouseWheel event. Raises the Move event. Raises the PaddingChanged event. Raises the Paint event. Paints the background of the TabPage.
Raises the BackColorChanged event when the BackColor property value of the control's container changes. Raises the BackgroundImageChanged event when the BackgroundImage property value of the control's container changes. Raises the BindingContextChanged event when the BindingContext property value of the control's container changes.
Raises the ParentChanged event. Raises the EnabledChanged event when the Enabled property value of the control's container changes. Raises the FontChanged event when the Font property value of the control's container changes. Raises the ForeColorChanged event when the ForeColor property value of the control's container changes. Raises the VisibleChanged event when the Visible property value of the control's container changes.
Raises the PreviewKeyDown event. Raises the QueryContinueDrag event. Raises the RegionChanged event. Fires the event indicating that the panel has been resized. Inheriting controls should use this in favor of actually listening to the event, but should still call base.
Raises the RightToLeftChanged event. Raises the Scroll event. Raises the SizeChanged event. Raises the StyleChanged event. Raises the SystemColorsChanged event.
Raises the TabIndexChanged event. Raises the TabStopChanged event. Raises the TextChanged event. Raises the Validated event. Raises the Validating event. Raises the VisibleChanged event. Forces the control to invalidate its client area and immediately redraw itself and any child controls.
Resets the BackColor property to its default value. Causes a control bound to the BindingSource to reread all the items in the list and refresh their displayed values. Resets the Cursor property to its default value. Resets the Font property to its default value. Resets the ForeColor property to its default value. Resets the ImeMode property to its default value.
Resets the control to handle the MouseLeave event. Resets the RightToLeft property to its default value. Resets the Text property to its default value Empty. Converts the specified ContentAlignment to the appropriate ContentAlignment to support right-to-left text.
Converts the specified HorizontalAlignment to the appropriate HorizontalAlignment to support right-to-left text. Activates a child control. Optionally specifies the direction in the tab order to select the control from. Sets a value indicating how a control will behave when its AutoSize property is enabled. Sets a specified ControlStyles flag to either true or false. Returns a string containing the value of the Text property. Occurs when the value of the AutoSize property changes.
Occurs when the value of the AutoSize property has changed. Occurs when the value of the BackColor property changes. Occurs when the value of the BackgroundImage property changes.
Occurs when the BackgroundImageLayout property changes. Occurs when the value of the BindingContext property changes. Occurs when the value of the CausesValidation property changes.
Occurs when the value of the ClientSize property changes. Occurs when the value of the ContextMenu property changes. Occurs when the value of the ContextMenuStrip property changes. Occurs when a new control is added to the Control. Occurs when a control is removed from the Control. Occurs when the value of the Cursor property changes. Occurs when the component is disposed by a call to the Dispose method. Occurs when the value of the Dock property changes. Occurs when the DPI setting for a control is changed programmatically after the DPI of its parent control or form has changed.
Occurs when the DPI setting for a control is changed programmatically before a DPI change event for its parent control or form has occurred. Occurs when the value of the Enabled property changes. Occurs when the Font property value changes. Occurs when the ForeColor property value changes. Occurs when the ImeMode property has changed. Occurs when the value of the Location property changes. Occurs when the Location property value has changed.
Occurs when the Parent property value changes. Occurs before the KeyDown event when a key is pressed while focus is on this control. Occurs when AccessibleObject is providing help to accessibility applications. Occurs during a drag-and-drop operation and enables the drag source to determine whether the drag-and-drop operation should be canceled.
Occurs when the value of the Region property changes. Occurs when the RightToLeft property value changes. Occurs when the Size property value changes. Occurs when the value of the TabIndex property changes. Occurs when the value of the TabStop property changes. Occurs when the value of the Text property changes. Occurs when the value of the Visible property changes. Feedback will be sent to Microsoft: By pressing the submit button, your feedback will be used to improve Microsoft products and services.
Privacy policy. Skip to main content. This browser is no longer supported. Download Microsoft Edge More info. Contents Exit focus mode. Forms Assembly: System. Note In. Note Controls contained in a TabPage are not created until the tab page is shown, and any data bindings in these controls are not activated until the tab page is shown.
Is this page helpful? Yes No. Any additional feedback? Skip Submit. TabPage String. Inherited from ScrollableControl. Determines whether the user has enabled full window drag. Inherited from Control. Gets or sets the description of the control used by accessibility client applications. Gets or sets the name of the control used by accessibility client applications. Gets or sets the accessible role of the control. Gets or sets a value indicating whether the control can accept data that the user drags onto it.
Gets or sets the size of the auto-scroll margin. Gets or sets the minimum size of the auto-scroll. Gets or sets the location of the auto-scroll position. Gets or sets a value that indicates whether the control resizes based on its contents.
Inherited from Panel. Indicates the automatic sizing behavior of the control. Gets or sets the background color for the control. Gets or sets the background image displayed in the control. Indicates the border style for the control. Gets a value indicating whether the control can receive focus. Determines if events can be raised on the control. Gets a value indicating whether the control can be selected. Gets or sets a value indicating whether the control has captured the mouse.
Gets the rectangle that represents the client area of the control. Gets or sets the height and width of the client area of the control.
Gets the name of the company or creator of the application containing the control. Inherited from Component. Gets or sets the shortcut menu associated with the control. Gets the collection of controls contained within the control. Gets a value indicating whether the control has been created. Gets the required creation parameters when the control handle is created.
Gets or sets the cursor that is displayed when the mouse pointer is over the control.
0コメント