Note: this article only applies to conversions to VB.NET.
VB Migration Partner replaces the VB6 App object with the special App6 object, as in the following examples:
lblCopyright.Version = App6.Major & "." & App6.Minor & App6.Revision
Most of the App6 members, however, are just wrappers around .NET Framework methods or properties of the My.Application.Info object, thus you might prefer to see the native .NET members in the generated code. VB Migration Partner doesn’t do the replacement automatically, but you can force it yourself with a bunch of PostProcess pragmas:
Notice that the AppDomain.GetCurrentThreadID method is deprecated and marked as obsolete, therefore you’ll see an extra warning in the resulting VB.NET code.
App.Title property requires a more complex regular expression, because you can’t do the replacement when the property is written to:
Message 8018 is emitted when the App.Title property is emitted; you may want to disable it:
Finally, you can map the HelpFile, HelpContextID, and UnattendedApp properties to constants that are defined in the VisualBasic6_Support.bas module:
Remember to use the project: prefix for all these PostProcess pragmas, if you want them to apply to the entire project. Alternatively, store these pragmas in a VBMigrationPartner.pragmas file, so that you can easily apply it to all the projects you mean to convert.