Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 20th, 2012, 10:41 PM
Authorized User
Points: 76, Level: 1
Points: 76, Level: 1 Points: 76, Level: 1 Points: 76, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
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.
  #2 (permalink)  
Old June 20th, 2012, 11:46 PM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
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!)
  #3 (permalink)  
Old June 26th, 2012, 11:37 AM
Rod Stephens's Avatar
Wrox Author
Points: 3,166, Level: 23
Points: 3,166, Level: 23 Points: 3,166, Level: 23 Points: 3,166, Level: 23
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2006
Location: , , .
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!)
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 09:06 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.