This documentation is archived and is not being maintained.

ComboBox Control Changes in Visual Basic .NET

The ComboBox control in Visual Basic 6.0 is replaced by the Windows Forms ComboBox control in Visual Basic .NET. The names of some properties, methods, events, and constants are different, and in some cases there are differences in behavior.

The following tables list Visual Basic 6.0 properties, methods, and events and their Visual Basic .NET equivalents. Where applicable, constants are indented beneath the property or method. All Visual Basic .NET constants map to the System.Windows.Forms namespace unless otherwise noted.

Links are provided as necessary to topics explaining differences in behavior. Where there is no direct equivalent in Visual Basic .NET, links are provided to topics that present alternatives.

ComboBox Properties

Visual Basic 6.0Visual Basic .NET Equivalent
AppearanceNo equivalent. For more information, see Appearance and BorderStyle Property Changes in Visual Basic .NET.
BackColor
BackColor
Note   Colors are handled differently in Visual Basic .NET. For more information, see Color Behavior Changes in Visual Basic .NET.
For a list of constants, see Color Changes in Visual Basic .NET.
CausesValidationCausesValidation
ContainerParent
DataChangedNo equivalent. For more information, see Data Changes in Visual Basic .NET.
DataFieldNo equivalent. For more information, see Data Changes in Visual Basic .NET.
DataFormatNo equivalent. For more information, see Data Changes in Visual Basic .NET.
DataMemberNo equivalent. For more information, see Data Changes in Visual Basic .NET.
DataSourceNo equivalent. For more information, see Data Changes in Visual Basic .NET.
DragIconNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
DragModeNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
EnabledEnabled
FontFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontBoldFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontItalicFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontNameFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontSizeFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontStrikethruFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
FontUnderlineFont
Note   Fonts are handled differently in Visual Basic .NET. For more information, see Font Changes in Visual Basic .NET.
ForeColor
ForeColor
Note   Colors are handled differently in Visual Basic .NET. For more information, see Color Behavior Changes in Visual Basic .NET.
For a list of constants, see Color Changes in Visual Basic .NET.
HeightHeight, Size
Note   Coordinates are handled differently in Visual Basic .NET. For more information, see Coordinate System Changes in Visual Basic .NET.
HelpContextIDNo equivalent. For more information, see Help Support Changes in Visual Basic .NET.
HWndHandle
IndexNo equivalent. For more information, see Control Array Changes in Visual Basic .NET.
IntegralHeightIntegralHeight
ItemDataNo equivalent. For more information, see ItemData property cannot be upgraded.
LeftLeft
Note   Coordinates are handled differently in Visual Basic .NET. For more information, see Coordinate System Changes in Visual Basic .NET.
ListItems
ListCountItems.Count
ListIndexSelectedIndex
LockedNo equivalent. For more information, see Locked Property Changes in Visual Basic .NET.
MouseIconNo equivalent. For more information, see Cannot set a custom MousePointer.
MousePointerCursor

For a list of constants, see MousePointer Changes in Visual Basic .NET.

NameName.
NewIndexNo equivalent. For more information, see NewIndex property cannot be upgraded.
OLEDragModeNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLEDropModeNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
ParentFindForm method
RightToLeft
True

False

RightToLeft
RightToLeft.Yes

RightToLeft.No

SelLengthSelectionLength
SelStartSelectionStart
SelTextSelectedText
SortedSorted
Style
0 - DropDown Combo

1 - Simple Combo

2 - DropDown List

DropDownStyle
ComboBoxStyle.DropDown

ComboBoxStyle.Simple

ComboBoxStyle.DropDownList

TabIndexTabIndex
TabStopTabStop
TagTag
TextText
ToolTipTextToolTip component

For more information, see ToolTip Changes in Visual Basic .NET.

TopTop
Note   Coordinates are handled differently in Visual Basic .NET. For more information, see Coordinate System Changes in Visual Basic .NET.
TopIndexNo equivalent. For more information, see TopIndex Property and Scroll Event Changes in Visual Basic .NET.
VisibleVisible
WhatsThisHelpIDNo equivalent. For more information, see Help Support Changes in Visual Basic .NET.
WidthWidth, Size
Note   Coordinates are handled differently in Visual Basic .NET. For more information, see Coordinate System Changes in Visual Basic .NET.

ComboBox Methods

Visual Basic 6.0Visual Basic .NET Equivalent
AddItemItems.Insert or

Items.Add

ClearItems.Clear
DragNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
MoveSetBounds
Note   Coordinates are handled differently in Visual Basic .NET. For more information, see Coordinate System Changes in Visual Basic .NET.
OLEDragNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
RefreshRefresh
RemoveItemItems.Remove
SetFocusFocus
ShowWhatsThisNo equivalent. For more information, see Help Support Changes in Visual Basic .NET.
ZOrder
0 – vbBringToFront

1 - vbSendToBack

BringToFront() or SendToBack() functions
BringToFront()

SendToBack()

ComboBox Events

Visual Basic 6.0Visual Basic .NET Equivalent
ChangeTextChanged
Note   The behavior of the TextChanged event is slightly different. For more information, see Change Event Changes in Visual Basic .NET.
ClickSelectedIndexChanged
DblClickNo equivalent. Use the SelectedIndexChanged or TextChanged events.
DragDropNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
DragOverNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
DropDownDropDown
GotFocusEnter
KeyDownKeyDown
KeyPressKeyPress
KeyUpKeyUp
LostFocusLeave
OLECompleteDragNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLEDragDropNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLEDragOverNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLEGiveFeedbackNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLESetDataNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
OLEStartDragNo equivalent. For more information, see Drag and Drop Changes in Visual Basic .NET.
ScrollNo equivalent. For more information, see TopIndex Property and Scroll Event Changes in Visual Basic .NET.
ValidateValidating

See Also

Introduction to the Windows Forms ComboBox Control | Change Event Changes in Visual Basic .NET

Show: