Article ID: 223114 - Last Review: May 13, 2003 - Revision: 2.0 FIX: Scale and Line Methods Work Differently on Printer ObjectThis article was previously published under Q223114 On This PageSYMPTOMS
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. 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.
STATUSMicrosoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article. This bug was corrected in Visual Studio 6.0 Service Pack 3. For more information about Visual Studio service packs, please see the following articles in the Microsoft Knowledge Base: 194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why (http://support.microsoft.com/kb/194022/EN-US/ ) 194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed (http://support.microsoft.com/kb/194295/EN-US/ ) MORE INFORMATION
This section illustrates how to create a Visual Basic project that demonstrates this behavior. It assumes you are familiar with using the methods of the Printer and Form objects.
Steps to Reproduce Behavior
| Article Translations
|
Back to the top
