Previous | Index | Next 

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

VB Migration Partner’s support library hides most of the differences between the VB6 and the .NET versions of the SSTab 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. All the tabs in the VB.NET control are visible and enabled. VB Migration Partner offers support for the TabVisible and TabEnabled properties by relying on the Visible and Enabled properties of the TabPage .NET control. However, both properties are deprecated aren’t officially supported by Microsoft. Please ensure that you test your VB.NET under all possible circumstances, different operating system versions, and so on, before deplying the migrated application to your customers.
  2. The BackColor and ForeColor properties aren’t supported and are marked as obsolete. These properties retain the value assigned to them, but have no other effect.
  3. The VB.NET control can’t display pictures, therefore the Picture and TabPicture properties aren’t supported and are marked as obsolete. These properties always return Nothing; assigning them a non-Nothing value throws an exception (if VB6Config.ThrowsOnUnsupportedMembers is True).
  4. The VB.NET control can’t wrap long captions in tabs, therefore the WordWrap property isn’t supported and always returns False. Reading this property always returns False; assigning it the True value throws an exception (if VB6Config.ThrowsOnUnsupportedMembers is True).
  5. The VB.NET control can display tabs on multiple rows but you can’t decide how many tabs must be displayed in each row, therefore the TabsPerRow property isn’t supported and is marked as obsolete. This property returns the value you assigned to it; assigning it a value higher than the current number of tabs indirectly sets the Multiline property to true.
  6. The Style property isn’t directly supported and is marked as obsolete. Reading this property returns the last value you assigned to it; assigning it a value indirectly affects the shape of individual tabs by means of the AutoSize property.
  7. The VB.NET control always displays focus rectangles, therefore the ShowFocusRect property isn’t supported and is marked as obsolete. Reading this property always returns True; assigning it the False value throws an exception (if VB6Config.ThrowsOnUnsupportedMembers is True).
  8. In VB6 you can move the focus to a control located on a tab that isn’t currently visible by pressing the Alt+key combination corresponding to the hotkey associated with that control. This operation isn’t directly supported by the .NET control, but you can enable it as explained in this KB article.
  9. When you click on the control to give it the input focus, VB6 raises the following events: GotFocus, MouseDown, MouseUp. In VB.NET the order is slightly different: MouseDown, GotFocus, MouseUp.
  10. When you double-click on a tab, VB6 raises the following events: MouseDown, GotFocus, MouseUp, DblClick, MouseUp. In VB.NET the event sequence is different: GotFocus, MouseDown, MouseUp, MouseDown, DblClick, MouseUp.
  11. Under VB6, if a control is on a tab that isn’t currently visible, then its events are fired anyway and can be trapped by the client application. For example, setting the Text property of a TextBox contained in any tab of an SSTab fires the corresponding Changed event. Conversely, under .NET controls that are on tabs other than the currently active tab don’t raise any event. This behavior is inherent to the .NET TabControl and can’t be changed.

 

Previous | Index | Next