VB Migration Partner’s support library hides most of the differences between the VB6 and the .NET versions of the TabStrip control, but not all of them. In most cases the remaining differences should have no impact on migrated programs. Here’s their complete list:
- If Placement property is set to any value other than 0-tabPlacementTop, then the Style property can’t be set to 2-tabFlatButtons.
- The TabFixedWidth and TabFixedHeight properties might cause the VB.NET control not to look like the VB6 control on forms whose ScaleMode is set to a value other than 1-Twips.
- The MultiSelect property isn’t supported and always returns False. Assigning a different value causes an exception. The Deselect method isn’t supported and always throws an exception.
- The Separators property isn’t supported and always returns True. Assigning a different value causes an exception.
- The TabMinWidth property isn’t supported and always returns 0. Assigning a different value causes an exception.
- The TabStyle property isn’t supported and always returns 0-tabTabStandard. Assigning a different value causes an exception.
- The Left and Top properties of individual TabPage elements can return values that don’t match exactly those returned in the VB6 application.
- The Highlighted property of individual TabPage elements isn’t supported and always returns False. Assigning a different value causes an exception.
- If the user clicks on the tab that is currently selected, VB6 fires the MouseDown, MouseUp, and Click events. In the same circumstances, VB.NET fires only the MouseDown and MouseUp events.
- If the user clicks on a tab other than the currently selected tab, the VB6 control fires the following events: MouseDown, BeforeClick, GotFocus, MouseUp, Click. In the same circumstances, the VB.NET controls fires the events in a different order: GotFocus, BeforeClick, Click, MouseDown, MouseUp.
- If you select a tab other than the currently selected tab, via code, the VB6 control fires the BeforeClick and Click events; in the same circumstances, the VB.NET control fires the LostFocus, Validate, GotFocus, BeforeClick, and Click events.
NOTE: Some customers have noticed that the Upgrade Wizard (included in Visual Studio 2005 and 2008) apparently doesn’t suffer from the problems mentioned in this article, which might induce into thinking that VB Migration Partner is less powerful than UW. The point, however, is, that UW doesn’t actually convert the TabStrip control and produces a .NET form that hosts the original ActiveX control. As such, the ActiveX control is guaranteed to work exactly as it did in VB6. Conversely, VB Migration Partner performs a “true” conversion into the corresponding TabControl .NET control and suffers from all the limitations of this .NET control.