FIX: Scale and Line Methods Work Differently on Printer Object (223114)
The information in this article applies to:
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q223114 SYMPTOMS
The Scale and Line methods are used to display a line on a form in a Visual Basic project. When the same arguments for the Scale and Line methods are used with the Printer object, the lines on the printed page are different from those displayed on the form. The expected behavior is that the line printed on the page will match the line displayed on the form.
CAUSE
The Printer.Scale method does not properly handle the case where the value of one of the XY coordinates in the second point is less than the value of corresponding coordinate in the first point.
For example, the following statement would behave incorrectly because the value of the second Y coordinate is less than that of the first one.
Printer.Scale (0, 5)-(10, 0)
RESOLUTION
Remove the call to the Scale method and replace it by setting the ScaleLeft, ScaleTop, ScaleWidth, and ScaleHeight properties as shown in the sample in the MORE INFORMATION section.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbBug kbfix kbprint kbVS600sp3fix KB223114 |
---|
|