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.
- 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
- 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.