Wednesday, September 10, 2008

C#: More Improvements, More Learning

C#: More Improvements, More Learning

I've added Page Setup and Page Preview to the Web Page Link Audit Tool. I spent a bit of time trying to figure out why Print Preview would show the page on the screen--but printed a blank page.

It turned out that my strategy for making the PrintPage method work was to have it use some variables to keep track of whether various parts of the output had been formatted for printing yet. The Page Preview command invoked the PrintPage method to set up output for the screen--but when I hit the Print button in that window, the variables keeping track of printing said that everything was done. You can see how I solved this by looking at how I reset those variables on the last time exiting from PrintPage.

No comments:

Post a Comment