Previous | Index | Next 

[INFO] All ListBox and Frame controls in an array must have same style

Under VB6, a simple ListBox control can display checkboxes by simply setting its Style property to 1-Checked. Likewise, a VB6 Frame control can display or hide its border by assigning 1 or 0 to its BorderStyle property.

Under .NET, however, changing the style of a ListBox or Frame control isn’t possible: a VB6 listbox with checkboxes must be converted into a CheckedListBox control under .NET. Similarly, a VB6 Frame control with border is converted into a GroupBox control, whereas a borderless Frame control becomes a Panel control under .NET.

VB Migration Partner takes care of these transformations and you don’t usually have to worry about them, except for two details:

  1. The BorderStyle property of a Frame control is readonly at runtime under .NET.
  2. All the elements in an array of Frame or ListBox controls must have the same style – that is, must have the same value for the BorderStyle and Style properties, respectively.

When migrating an array of Frame or ListBox controls, VB Migration Partner changes the value of the BorderStyle and Style properties, respectively, so that they match the property value found in the first element in the array. No warning is issued.


Previous | Index | Next