Another way to compare VB6 migration tools is to check the list of migration
warnings that they emit. We have carefully scrutinized all VBUC’s Errors,
Warnings and Issues (EWIs), using its online
documentation. It’s worth noticing that, seven years after VBUC inception,
this documentation hasn’t been completed yet and many EWIs are still not
documented (as of mid-October 2009).
The following table lists all documented VBUC EWIs, with their numeric code and
official name. The 3rd column contains the
or symbol symbol if VBMP fully or partially supports the corresponding feature (and can therefore avoid to emit a message). We have omitted EWIs related to previous versions of VBUC and EWIs that can be emitted only when converting to C#.
Issue
|
1002
|
LSet cannot assign one type to another
|
|
This is an intrinsic VB.NET limitation. VBMP solves this problem in a subset of all possible cases.
|
1010
|
The preceding lines couldn’t be parsed
|
|
In the rare occurrence of an internal error, VBMP emits a similar message. In practice it happens only when the original VB6 code isn’t correct and would fail to compile.
|
1014
|
%1 statement isn’t supported
|
|
VBMP supports Gosub, On Goto, On Gosub and virtually all the documented VB6 keywords.
|
1016
|
Declaring a parameter As Any is not supported
|
|
VBMP fully supports As Any parameters in Declare statements.
|
1039
|
Load statement is not supported
|
|
VBMP fully supports Load and Unload statements with forms.
|
1040
|
%1 function is not supported
|
|
Unlike VBUC, VBMP supports the IsMissing function and partially supports the VarPtr undocumented keyword.
|
1043
|
Class instancing was changed to Public
|
|
VBMP takes care of all the implications of changing a class’s visibility.
|
1046
|
%1 parameter “%2” is not supported and was removed
|
|
Like VBUC, VBMP doesn’t support the size, colorDepth, x, and y parameters in LoadPicture method. Unlike VBUC, VBMP does support all parameters in the AppActivate method.
|
1050
|
Structure %1 may require marshaling attributes to be passed as an argument in this Declare statement
|
|
In virtually all cases VBMP generates the correct MarshalAs attributes for structures passed to Declare statements.
|
1058
|
Assignment not supported: KeyAscii to a non-positive constant (blank page)
|
|
VBMP correctly handles this scenario.
|
1060
|
COM expression not supported (blank page)
|
?
|
(not enough info to decide whether VBMP emits a similar warning)
|
1064
|
Try/Catch not supported with On Error Goto statements in same method (blank page)
|
|
This is an intrinsic VB.NET limitation. VBMP emits a similar warning in this case.
|
2036
|
Property %1 doesn’t support custom mousepointers
|
|
VBMP correctly handles custom mouse pointers.
|
2038
|
Form property %1.ScaleMode is not supported
|
|
VBMP correctly handles runtime assignments to the ScaleMode property and fully supports user-defined coordinate systems and negative values for ScaleWidth and ScaleHeight properties.
|
2042
|
A string cannot be used to index the Controls collection
|
|
VBMP correctly migrates numeric and string indexes in the Controls collection.
|
2049
|
Unable to determine which constant to upgrade %1 to. Its original numerical value (%2) was used instead. (blank page)
|
|
All VBMP enum values retain the original VB6 value, therefore using the original numeric value is never an issue.
|
2050
|
%1 Event %2.%3 was not upgraded
|
|
VBMP fully supports all drag-and-drop events and, with very few exceptions, all VB6 events that have no direct counterpart under .NET.
|
2059
|
%1 Property %2.NewIndex was not upgraded
|
|
VBMP correctly migrates the NewIndex property.
|
2064
|
%1 %2 %3.%4 was not upgraded
|
|
VBUC can generate stub methods to avoid compilation errors related to controls’ members that have no .NET counterpart, but you later have to implement the missing members. VBMP directly supports the vast majority of all VB6 controls’ properties and methods, no manual fixes are necessary
|
2067
|
%1 control %2 was not updated (blank page)
|
|
VBMP can translate all the controls in the VB6 toolbox, with the only exception of OLE container and DataRepeater.
|
2068
|
%1 was not upgraded
|
|
VBMP correctly migrates VB6-specific objects such as PropertyBag.
|
2069
|
%1 Property %2 was not upgraded
|
|
VBMP correctly migrates VB6-specific objects such as PropertyBag and all their properties and methods.
|
2070
|
Constant %2 was not upgraded
|
|
VBMP correctly converts all constants defined in VB and VBA libraries.
|
2072
|
%1 %2 could not be resolved because it was within the generic namespace %3
|
|
VBMP correctly handles late-bound calls to methods defined in Form classes.
|
2074
|
%1 property %2 was upgraded to %3 which has a new behavior
|
|
VBMP preserves 100% functional equivalence of controls’ properties and methods.
|
2080
|
%1 was upgraded to %2 and has a new behavior
|
|
VBMP preserves 100% functional equivalence of controls’ properties and methods.
|
2081
|
%1 has a new behavior
|
|
VBMP preserves 100% functional equivalence of controls’ properties and methods.
|
6002
|
UserControl event %1 is not supported
|
|
VBMP supports the majority of UserControls properties, methods, and events.
|
6003
|
%1 %2 was not upgraded
|
|
VBMP correctly migrates VB6-specific objects such as PropertyBag and all their properties and methods.
|
7002
|
It cannot be completely determined if Forms.Controls returns a default property or a control array (blank page)
|
|
VBMP doesn’t suffer from this problem.
|
7003
|
The hDC should be released once it is used for safety
|
|
VBMP emits this message too.
|
7007
|
Comparison between object type need a review (blank page)
|
|
Object type comparison is never a problem with VBMP.
|
7008
|
The ProgID could not be found on computer when this application was migrated
|
|
In most cases VBMP can handle this case nicely.
|
Warning
|
1003
|
ParamArray %1 was changed from ByRef to ByVal
|
|
VBMP detects whether a ParamArray element is assigned to inside the method and correctly generates code that implements the original ByRef semantics.
|
1037
|
Couldn’t resolve default property of object %1
|
|
By default VBMP emits a similar message, but you can use a DefaultMemberSupport pragma to generate calls to a helper method that resolves the default property at runtime.
|
1041
|
%1 was upgraded to %2 and has a new behavior
|
|
VBMP correctly converts all B-suffixed string functions (e.g. LenB, LeftB, etc.)
|
1043
|
Class instancing was changed to public
|
|
VBMP automatically changes the class visibility and generates code that ensures that original behavior is preserved.
|
1044
|
Sub Main in a DLL won’t get called
|
|
VBMP correctly generates some code to ensure that the Sub Main method is invoked at the right time even when inside a DLL.
|
1047
|
Application will terminate when Sub Main finishes
|
|
VBMP provides a workaround for this issue.
|
1048
|
Add a delegate for AddressOf %1
|
|
VBMP automatically generates the delegate definition in such cases.
|
1063
|
Arrays in structure %1 may need to be initialized before they can be used
|
|
VBMP generates the code that initializes a structure before it is used, and correctly creates arrays, fixed-length strings, and As New objects.
|
1068
|
%1 variable of type Variant is being forced to scalar
|
|
VBMP supports type inference and can attempt to detect the most suitable type for all Variant and Object variables.
|
2065
|
%1 event %2 has a new behavior
|
|
All form and control events retain the original behavior under VBMP. There are very few exceptions to this rule and all of them are thoroughly documented in our knowledge base.
|
2075
|
Event %1.%2 may fire when form is initialized (blank page)
|
|
VBMP ensures that all control events are disabled while the form is being initialized.
|
6022
|
The CommonDialog CancelError property is not supported in Visual Basic .NET
|
|
VBMP fully supports the CancelError property.
|
7009
|
Multiple invocations to ShowDialog in forms with ActiveX controls might throw runtime exceptions
|
|
This issue is related to a bug of Microsoft COM Interop.
|
Note
|
7001
|
The following declaration %1 seems to be dead code
|
|
VBMP emits a similar message when spotting unused or unreachable code;
you can use RemoveUnusedMembers and
RemoveUnreachableCode pragmas to automatically remove or comment out the unused code.
|
Todo
|
1035
|
#If #EndIf block was not upgraded because the expression %1 did not evaluate to True or was not evaluated
|
|
Like VBUC, VBMP can’t correctly migrate code in #IF portions whose condition is false.
|
1059
|
Code was upgraded to %1 which may not have the same behavior
|
|
VBMP correctly handles assignments between strings and Byte arrays.
|
1065
|
Error handling statement (%1) could not be converted properly. A throw statement was generated instead.
|
|
If VBMP can’t convert an On Error statement to Try/Catch, it leaves the unchanged statement in code, which ensures that functional equivalence is preserved.
|
1066
|
%2 is defined by a CreateObject method, which class name isn’t registered
|
|
VBMP never attempts to solve ProgIDs passed as arguments to CreateObject method.
|
1067
|
Member %2 is not defined in type %3
|
|
VBMP doesn’t emit this message because in general migrated controls expose members with same name as the original VB6 controls, therefore everything works fine even in late-bound scenarios.
|
1069
|
Error handling statement (%1) was converted to a complex pattern which might not be equivalent to the original
|
|
If an On Error statement can’t be reliable converted to a 100% equivalent Try/Catch block, VBMP preserves the original On Error statement.
|
2018
|
Remove the next line of code to prevent form from automatically showing
|
|
VBMP fully support the AutoShowChildren property and ensures that MDI child forms behave like in VB6.
|
2045
|
Only TrueType and OpenType fonts are supported in Windows Forms
|
|
VBMP automatically converts unsupported fonts into the closest TT or OT equivalent font; in addition,
the FormFont,
ReplaceFont,
and ReplaceFontSize
pragmas gives you full control over fonts used in forms and controls
|
7010
|
The connection string must be verified to fulfill the .NET data provider connection string requirements
|
|
This is never an issue with VBMP, regardless of whether you use ADODB objects or migrate to ADO.NET by means of the ADOLibrary.
|
Each EWI from VBUC contains the URL of a web page that explains the problem and how to fix it.
(In theory at least, because a few URLs lead you to a blank page…). In addition to getting
information on individual warnings, VBMP users can quickly obtain a report that recaps all the
warnings in the generated code *and* the recommendations for each of them. It’s a minor
detail that saves you precious minutes and immediately provides an overview of the overall
effort and expertise that are necessary to successfully complete the migration.