Unable to determine which equivalent constant is appropriate for this context
In some cases, constants or enumerations for Visual Basic 6.0 are not upgraded because there are two or more Visual Basic .NET equivalents. For example, the Visual Basic 6.0 constant vbRightJustify could be mapped to System.Windows.Forms.HorizontalAlignment.Right, System.Drawing.ContentAlignment.TopRight, or System.Drawing.ContentAlignment.MiddleRight in Visual Basic .NET, depending on the type of control. In cases where the type of control is not known, the constant cannot be mapped.
' Visual Basic 6.0 Dim x As Control Set x = Text1 x.Alignment = vbRightJustify
' After upgrade to Visual Basic .NET Dim x As Object x = Text1 ' UPGRADE_ISSUE: Unable to determine which constant to upgrade ' vbRightJustify to. x.Alignment = vbRightJustify
What to do next
- Determine which Visual Basic .NET constant or enumeration is appropriate for the given context and modify the code. You can use the Intellisense feature of the code editor to get a list of available enumerations.
' Modified Visual Basic .NET code Dim x As Object x = Text1 x.TextAlign = System.Windows.Forms.HorizontalAlignment.Right