Product: MapX
Version: 3.x/4.x
Platform: All Win32 Platforms
Category: Printing
Summary:
Printing MapX map to a specific size using Map.PrintMap.
Question:
How can a map be set to print exactly at 200 by 200 mm using Map.PrintMap?
Answer:
HIMETRIC is the scale mode that specifies physical sizes. For example, the number of HIMETRIC units in a line of 10 centimeters is 10,000. The resulting line drawn on the screen is ten centimeters long, regardless of the size of the video display area. For information on the HIMETRIC scale mode and physical sizes, see the Microsoft Windows SDK.
Map.PrintMap method expresses its coordinates in HIMETRIC units. Any value can be passed to make the map print at 200 by 200 mm. Just convert from the units being used to HIMETRIC. The values of the Map1.Width and/or Height properties (multiply, add to) can be manipulated to make an equivalent value in HIMETRIC units.
So, a line like this produces a printout that is 200 by 200 mm. 200 mm = 20,000 HIMETRIC
Private Sub Print_Click()
frmMap.ScaleMode = 6 'set mode to mm
Printer.CurrentX = 0
Printer.CurrentY = 0
Printer.Print " "
Map1.PrintMap Printer.hDC, 0, 0, 20000, 20000
Printer.NewPage ' Send new page
Printer.EndDoc ' Printing is finished.
End Sub
Last Modified: 08/10/1999 03:20:15 PM
|