Wrox Programmer Forums
|
BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer
This is the forum to discuss the Wrox book Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer by Rod Stephens; ISBN: 9780470596906
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Stephens' C# Programming with Visual Studio 2010 24-Hour Trainer section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 20th, 2012, 10:41 PM
Authorized User
 
Join Date: Jan 2012
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
Default Lesson 31 stuff

Is Lesson 31 mainly utilizing Window's built-in print functions?

We are just writing codes that invoke Window's print dialog review or print?

Thanks.
 
Old June 20th, 2012, 11:46 PM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I'm out of town so I can't check, but that may be a big part of the lesson. Note, however, that you can't really display a preview dialog or print directly unless you handle the PrintPage event. That may be the more interesting part of the program.

I'll check on this when I get in town on Monday.
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)
 
Old June 26th, 2012, 11:37 AM
Rod Stephens's Avatar
Wrox Author
 
Join Date: Jan 2006
Posts: 647
Thanks: 2
Thanked 96 Times in 95 Posts
Default

I'm back in town.

This example actually does a lot more than just invoking the print preview dialog and the direct print methods. In it you loop through a series of records printing each one's data. You also need to keep track of the positions of what you print so you can draw a box around it all when you're done.

It's not super hard but it's non-trivial and when I give a problem like this to students they often have trouble getting the details right. One of the most common mistakes in the first attempt prints all of the records' data at the same spot making a big mess.

(Note that for any printing program, I spend a lot of time just looking at print previews so I don't waste a lot of paper. I usually don't actually print anything on paper until I'm pretty sure it works.)
__________________
Rod

Rod Stephens, Microsoft MVP

Essential Algorithms: A Practical Approach to Computer Algorithms

(Please post reviews at Amazon or wherever you shop!)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Expert Setting Page 31 ronald BOOK: Ivor Horton's Beginning Visual C++ 2010 1 January 12th, 2012 06:21 PM
Chapter 31 FTPClient tuckerssb BOOK: Professional Visual Basic 2008 ISBN: 978-0-470-19136-1 2 August 3rd, 2009 07:28 PM
system error 31 (MS Access) EricTheViking Access ASP 2 January 14th, 2008 04:40 PM
C# version: Pg 31-32 error Noisy Crow BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 1 November 10th, 2006 06:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.