Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting printers margins by code

24 views
Skip to first unread message

NAB

unread,
Aug 11, 1999, 3:00:00 AM8/11/99
to
Hi,
I uses Delphi 3.0 and I want to set (by code) the starting position of
printing anywhere on the paper.
I tried to set the Left, Top, Width, Height properties of the printer.canvas
without success. Must be a way to do this but how ? ( not using offset in
printing commands).
To set the clipping region I use the code bellow and works fine. Is there
something like this to move this region left/down ?

procedure setClipingRect;
var rgn : HRGN;
begin
with Printer do begin
rgn := CreateRectRgn( 0, 0, printingWidth,printingHeight);
SelectClipRgn( Canvas.Handle, rgn );
DeleteObject( rgn );
end;
end;

thanks in advance

Peter Below (TeamB)

unread,
Aug 11, 1999, 3:00:00 AM8/11/99
to
> I uses Delphi 3.0 and I want to set (by code) the starting position of
> printing anywhere on the paper.
> I tried to set the Left, Top, Width, Height properties of the printer.canvas
> without success.

It does not have any <g>. Try to use SetWindowOrgEx or OffsetWindowOrgEx (API)
on the Canvas.Handle.

Peter Below (TeamB) 10011...@compuserve.com)
No e-mail responses, please, unless explicitly requested!


0 new messages