Using "Rectangle" from Win32 API
Posted on 1999-07-01
I'm having some problems with this API-function. It doesn't seem to care about Printer.ScaleMode. Here's an example:
Public Sub PrintRectangle()
Dim b As Boolean
Printer.ScaleMode = 6
b = Rectangle(Printer.hdc, 80, 80, 160, 160)
From this, I get a small (about 1 x 1 cm) rectangle near the top left of the page, instead of a 8 x 8 cm rectangle 8 cm from the top and left edge. In the real code I want to use .CurrentX and .CurrentY as values, so I can't just adjust the numbers. What is wrong and how can it be solved?