Previous | Index | Next 

[INFO] Minor differences between VB6 and VB.NET TabStrip controls

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:

  1. If Placement property is set to any value other than 0-tabPlacementTop, then the Style property can’t be set to 2-tabFlatButtons.
  2. 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.
  3. 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.
  4. The Separators property isn’t supported and always returns True. Assigning a different value causes an exception.
  5. The TabMinWidth property isn’t supported and always returns 0. Assigning a different value causes an exception.
  6. The TabStyle property isn’t supported and always returns 0-tabTabStandard. Assigning a different value causes an exception.
  7. The Left and Top properties of individual TabPage elements can return values that don’t match exactly those returned in the VB6 application.
  8. The Highlighted property of individual TabPage elements isn’t supported and always returns False. Assigning a different value causes an exception.
  9. 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.
  10. 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.
  11. 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.

 

Previous | Index | Next