VB Migration Partner

KNOWLEDGE BASE - Forms and controls


Previous | Index | Next 

[INFO] Minor differences between CommonDialog, Printer, Line, and Shape VB6 classes and their implementation in CodeArchitects.VBPowerPack.dll

Starting with version 1.34, VB Migration Partner migrates the CommonDialog, Printer, Line, and Shapes classes to VB6CommonDialogPP, VB6PrinterPP, VB6LinePP, VB6ShapePP, and VB6ShapeOvalPP, all of which are defined in the CodeArchitects.VBPowerPack.dll. This article outlines the minor differences between these classes and the original VB6 objects.

VBPrinterPP

  • the DrawMode property always returns the value 13-vbCopyPen
  • the DrawStyle property doesn’t support the values 5-vbInvisible and 6-vbSolidInside
  • the DriverName and Port properties always return an empty string
  • the hDC property always throw an exception
  • the TrackDefault property is False by default (it is True under VB6); assigning True to this property works as expected, but adds a noticeable overhead.
  • the Zoom property always returns the value 0
  • the PaintPicture method only supports the value vbSrcCopy for the opcode argument

Assigning an unsupported value to the DrawMode, Zoom, DriverName, or Port properties throws an exception (if VB6Config.ThrowOnUnsupportedMember is true) or is ignored.

VB6CommonDialogPP (when displaying the Print dialog)

  • the HDC property always returns the value 0

VB6LinePP

  • DrawMode property only supports the value 1-vbBlackness

VB6ShapePP and VB6ShapeOvalPP
Square and rectangular shapes map to the VB6ShapePP class, whereas circular and oval shapes map to the VB6ShapePP classes. This arrangement has two implications:

  • You can’t change the Action property in a way that would require a change of the mapped class. For example, changing a square shape into an oval shape (or vice versa) isn’t supported. However, changing from square to rectangular (or vice versa) and changing from circular to oval (and vice versa) is supported.
  • You can create a control array containing both square/rectangular and circular/oval shapes at the same time.
Previous | Index | Next 




Follow Francesco Balena on VB6 migration’s group on

LinkedIn





Read Microsoft Corp’s official case study of a VB6 conversion using VB Migration Partner.




Code Architects and its partners offers remote and onsite migration services.

More details




Subscribe to our free newsletter for useful VB6 migration tips and techniques.

newsletter



To learn more about your VB6 applications, run VB6 Analyzer on your source code and send us the generated text file. You will receive a detailed report about your VB6 applications and how VB Migration Partner can help you to quickly and effectively migrate it to .NET.

Get free advice



A fully-working, time-limited Trial Edition of VB Migration Partner allows you to test it against your actual code

Get the Trial




The price of VB Migration Partner depends on the size of the VB6 application, the type of license, and other factors

Request a quote




Migrating a VB6 application in 10 easy steps

Comparing VB Migration Partner with Upgrade Wizard

Migration tools: Feature Comparison Table

All whitepapers