Export (0) Print
Expand All

How to: Fix Upgrade Errors by Using the Printer Compatibility Library (Visual Basic)

Visual Studio 2008

The Printer Compatibility library emulates the functionality of the Visual Basic 6.0 Printer object, which enables the Printer code in applications that have been upgraded from Visual Basic 6.0.

To fix Printer upgrade errors

  • Open the application in Visual Studio.

    If a Visual Basic 6.0 application has not yet been upgraded, opening it in Visual Studio will start the Upgrade tool.

    During upgrade, a reference to the Printer Compatibility library will be added to the project. In most cases, your Printer code should compile and run just as it did in Visual Basic 6.0.

    In some cases, code that uses the Circle, Line, or PSet methods will have to be modified before the code compiles. The Visual Basic 6.0 versions of these methods contained parentheses around X/Y pairs in the method signatures. These parentheses must be moved in order for the code to compile in Visual Basic 2008.

    For example, the upgraded Visual Basic 6.0 code Printer.Circle (1000, 1000), 2000 would have to be changed to Printer.Circle (1000, 1000, 2000) in order to compile.

Community Additions

ADD
Show:
© 2014 Microsoft