This section describes the differences between VB6 and .NET controls and the problems
you can find in migrating VB6 applications with user-interface. The differences
that are common to most controls are described in the
For a list of differences between VB6 and VB.NET language, see
CheckBox and OptionButton controls
Alignment property
The VB6 Alignment property is missing in VB.NET and is replaced by the CheckAlign and TextAlign properties.
Appearance property
The Appearance property has been renamed as FlatStyle.
Click event
The Click event is supported under VB.NET; however this event doesn’t fire when the control’s Value is changed via code. Also, it is advisable not to use the MouseClick event, because such an event doesn’t fire if the control’s value is changed via the keyboard. The most reliable way to replicate the original VB6 behavior is using the CheckStateChange event.
VB Migration Partner correctly handles all these differences. Converted VB.NET code works exactly as in the original VB6 program.
Picture and Style properties
The VB6 Picture property maps to the VB.NET Image and Appearance properties, but the Style property has no VB.NET counterpart. (In VB6 the Picture property is used only if Style=1-vbButtonGraphical.) Therefore, you should assign the .NET Image property only if you really mean to display an image.
In addition to displaying an image, the VB6 Style property affects the position of the control’s caption: in standard buttons the caption is centered vertically, whereas in graphical controls it is near to the bottom border. You can reach the same effect by assigning the VB.NET TextAlign property.
VB Migration Partner fully supports all the possible combinations of these two properties.
TabStop behavior (OptionButton only)
VB6 and VB.NET differ in how a radio button is given the focus when the end users presses the Tab key. Under VB6, when the end user tabs into a group of radio button, the button whose Value is True receives the focus. Conversely, under VB.NET the radio button with the lowest value of the TabIndex property receives the focus, regardless of whether it is checked or not.
VB Migration Partner accounts for this difference and correctly mimics the VB6 behavior.
Value property
This property isn’t supported and maps to the Checked property.
In addition, there is a minor difference in what happens when you set the property to False in a radio button that is currently checked. In a VB6 OptionButton control, setting this property to False fires no Click events; in a VB.NET RadioButton control this assignment causes a Click event. (Note that you typically set the Value property to False when you need to display a group of unchecked buttons.)
To fully mimic the VB6 behavior, VB Migration Partner provides a ResetValue method, which changes the value of the Value property without firing any event:
optChoice.ResetValue(False)