1. Home
  2. Computing & Technology
  3. Visual Basic
Working With Printers
More on Printing!

Everyone should code a program to manage a printing process similar to the ones in the last part of chapter 18! Writing code to carefully control the size of boxes and count lines and words to fit inside them is, after all, the "pick and shovel" work that occupies a lot of the hours and days of programmers everywhere. There are two things that should stand out as a result of this experience, however.

  1. The new objects available in .NET help A LOT!

    How would you like to write the code to calculate whether the text will fit without a function like MeasureString?

  2. Writing code like this is something that should be done just once and forever after packaged in an object so nobody else has to do it again.

And, in fact, that has been done! Well ... A number of versions have been done.

The first, and most obvious one was explained back in chapter 13 where we learned how to use the many object in Microsoft Office. Although the book focused on using Excel, Word has unsurpassed printing capability and can be incorporated into your program just like Excel. If you have Office available, don't code your own! Use Word! (I'm frankly surprised that the book didn't mention this!)

And if you don't have Word, there are lots of third party components that are available.

TX Text Control .NET
"Complete Development Tool for Comprehensive Feature-rich Word Processing Applications"

Developer Express XtraPrinting Library .NET
"Add advanced printing functionality to your applications"

TMG Development PrintForm .NET
"PrintForm for .NET helps you to add printing support to your application quickly and easily"

... to name just a few.

Finally, if you don't have Word and you end up writing your own powerful VB.NET printing system anyway - create your own object! We introduced the technology to do that in the previous chapter. Who knows? You could create a library of your own that others can use!

Return to first page >>>   Event Coding Is The Key
Page 1, 2, 3, 4

Explore Visual Basic

More from About.com

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2008 About.com, a part of The New York Times Company.

All rights reserved.