Previous | Index | Next 

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

VB Migration Partner’s support library hides most of the differences between the VB6 and the .NET versions of the ImageCombo 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. When the Locked property is set to True, the VB6 control allows the end user to select all or a portion of the string showed in the edit area, which he or she can then copy to the clipboard. Conversely, when the Locked property is True, the VB.NET control behaves as a combobox whose style is set to DropDownList. This detail prevents the end user from selecting all or part of the text that appears in the edit area. Consequently, when Locked is True the SetText property always returns “” (empty string) and the SelStart and SelLength properties always return 0 (zero).

  2. The VB6 ImageCombo control always display the image associated with the currently selected item when the list area is closed, regardless of the value of the Locked property. When the Locked property is False – in other words, when the end user can edit the text of the currently selected item – the VB6ImageCombo control used in converted VB.NET applications doesn’t display the image associated to the currently selected control when the list area is closed.

  3. When the Locked property is True and the ImageCombo control is bound to a data source, the VB6 control can still display any value from the database. Conversely, the VB.NET control displays a value from the database only if the value matches one of the items in its list area.

  4. In VB6, the Change event may fire multiple times – even four times! – when you add a new item to the control. We consider this to be a bug and haven’t replicated this behavior in the VB.NET, which fires the Change event just once.

 

Previous | Index | Next