Product : Engine, Version : 5.0.0.1033, ArticleID : 41023671

HowTo : How to Get the Printers Margins

Article41023671
TypeHowTo
ProductEngine
Version5.0.0.1033
Date Added8/11/2004
Submitted byXTakis
Keywords

Subject

How to Get the Printers Margins

Summary

How to Get the Printers Margins

Solution

Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long Private Const PHYSICALOFFSETX = 112 Private Const PHYSICALOFFSETY = 113 And then use these like this: MarginLeft = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETX) MarginTop = GetDeviceCaps(Printer.hdc, PHYSICALOFFSETY)