The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Getting the right Printer Margin Bounds when working in Windows Forms...

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Duncan Mackenzie

Posts: 689
Nickname: duncanma
Registered: Aug, 2003

Duncan Mackenzie is the Visual Basic Content Strategist at msdn.microsoft.com
Getting the right Printer Margin Bounds when working in Windows Forms... Posted: Jul 19, 2004 12:28 AM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Duncan Mackenzie.
Original Post: Getting the right Printer Margin Bounds when working in Windows Forms...
Feed Title: Code/Tea/Etc...
Feed URL: /msdnerror.htm?aspxerrorpath=/duncanma/rss.aspx
Feed Description: Duncan is the Visual Basic Content Strategist at MSDN, the editor of the Visual Basic Developer Center (http://msdn.microsoft.com/vbasic), and the author of the "Coding 4 Fun" column on MSDN (http://msdn.microsoft.com/vbasic/using/columns/code4fun/default.aspx). While typically Visual Basic focused, his blogs sometimes wanders off of the technical path and into various musing of his troubled mind.
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Duncan Mackenzie
Latest Posts From Code/Tea/Etc...

Advertisement

a Code Project link, via Darth Pedro's blog...

.NET: Printer Margin Bounds in .NET

There's a very good Code Project article by Philippe Leybaert on getting the appropriate printer margin bounds so that what you print from you WinForms application will appear correctly.
 
While PrintPageEventArgs has a property MarginBounds, this property doesn't account for the hard margins of your printer for left and right margins -- although they do appear to have the top and bottom margins right.  However, this article describes how you can get this information from the Windows API GetDeviceCaps.
 
It'll be interesting to see if this is fixed in Whidbey. 
 

 

Read: Getting the right Printer Margin Bounds when working in Windows Forms...

Topic: Visual Studio 2005: Two Events at Microsoft UK Previous Topic   Next Topic Topic: Picasa

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use