Cosmin,

this is the code I use to calculate the start of the printable area (i. e. the 
point with the coordinates 0/0):

function GetMinLeftMargin(DC: HDC): integer; { in 1/10 mm }
begin
 Result := 
Round((GetDeviceCaps(DC,PhysicalOffsetX)/GetDeviceCaps(DC,LogPixelsX))*254);
end;

function GetMinTopMargin(DC: HDC): integer; {in 1/10 mm }
begin
 Result := 
round((GetDeviceCaps(DC,PhysicalOffsetY)/GetDeviceCaps(DC,LogPixelsY))*254);
end;

Good luck,
Gunnar

_______________________________________________
Delphi mailing list -> [email protected]
http://www.elists.org/mailman/listinfo/delphi

Reply via email to