Home All Groups Group Topic Archive Search About

How to Find Printer's Left Most Margin and Top Most Margin

Author
6 Jul 2006 12:26 PM
Anne DeBlois
Hi,

In VB 2005, I need to get the printer's left most and top most margin that a
selected printer can prit to on a piece of paper, so I can adjust the
PrintDocument classes to get as uniform as possible a printout no matter
which print driver is selected. How do I get (and then set) this information
in VB?

Thank you so much in advance,

Anne

Author
6 Jul 2006 2:29 PM
Herfried K. Wagner [MVP]
"Anne DeBlois" <annedeblois@community.nospam> schrieb:
> In VB 2005, I need to get the printer's left most and top most margin that
> a selected printer can prit to on a piece of paper, so I can adjust the
> PrintDocument classes to get as uniform as possible a printout no matter
> which print driver is selected. How do I get (and then set) this
> information in VB?

..NET 1.*, maybe there isn't a managed way in .NET 2.0 too:

Determining a printer's physical margins
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=getphysicalprintermargins&lang=en>

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
6 Jul 2006 3:24 PM
Anne DeBlois
Thanks, I'll check it out.

Anne

"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> a écrit dans le
message de news: eg3lWiQoGHA.3***@TK2MSFTNGP04.phx.gbl...
Show quoteHide quote
> "Anne DeBlois" <annedeblois@community.nospam> schrieb:
>> In VB 2005, I need to get the printer's left most and top most margin
>> that a selected printer can prit to on a piece of paper, so I can adjust
>> the PrintDocument classes to get as uniform as possible a printout no
>> matter which print driver is selected. How do I get (and then set) this
>> information in VB?
>
> .NET 1.*, maybe there isn't a managed way in .NET 2.0 too:
>
> Determining a printer's physical margins
> <URL:http://dotnet.mvps.org/dotnet/faqs/?id=getphysicalprintermargins&lang=en>
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://classicvb.org/petition/>