469,610 Members | 1,494 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

Prints OK but PrintPreview Shows Only a Blanik Page

I have a print application modeled on a program which I found via this
newsgroup. (I still have comments in German in it!) The model uses
ExtendedPrintPreviewDialog but I don't seem to have that so I am using
PrintPreviewDialog.

It prints fine. But the PrintPreview dialog shows only one blank page.
Before I resort to posting code, is there some simple and/or common mistake
I could have made which would explain why PrintPreview shows me only one
blank page?

Thanks, Bob
Jun 3 '07 #1
2 1996
On Jun 3, 2:47 pm, "eBob.com" <eBob....@totallybogus.comwrote:
I have a print application modeled on a program which I found via this
newsgroup. (I still have comments in German in it!) The model uses
ExtendedPrintPreviewDialog but I don't seem to have that so I am using
PrintPreviewDialog.

It prints fine. But the PrintPreview dialog shows only one blank page.
Before I resort to posting code, is there some simple and/or common mistake
I could have made which would explain why PrintPreview shows me only one
blank page?

Thanks, Bob
Sample code?

Thanks,

Seth Rowe

Jun 4 '07 #2
After some experimentation I now have working code. For the benefit of
anyone else who might someday make the same mistakes I did, here's what
resolved my problem(s).

I had started with code modeled on some code which I found in Petzold. In
that code he used AddHandler to establish his PrintPage routine. In my code
that AddHandler statement ended up in the code for the Print menu item. So
the AddHandler was not being executed until the first time I actually
printed. However, in my original code PrintPreview was showing me only a
blank page even after actually printing. Part of my experimentation was to
replace the Petzold code for determining the printable area of the page with
some code from a Microsoflt sample which looks equivalent. So MAYBE there
was something in the way the Petzold code was determining the printable area
of the page which worked fine for my printer but didn't work so well for
PrintPreview. (I have my doubts, but that's the only explanation I can come
up with.)

The Microsoft sample which helped me to resolve my problem(s) is called
"How- To Do Simple Printing". Well ... that's the name of the directory on
my hard drive in which I found it - but I didn't make that name up. I can't
be sure now where I found it, but I'd guess here ...
http://www.microsoft.com/downloads/d...DisplayLang=en

Thanks Seth for your response. And Good Luck to anyone who stumbles upon
this while researching PrintPreview problems.

Bob

"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11********************@w5g2000hsg.googlegroup s.com...
On Jun 3, 2:47 pm, "eBob.com" <eBob....@totallybogus.comwrote:
>I have a print application modeled on a program which I found via this
newsgroup. (I still have comments in German in it!) The model uses
ExtendedPrintPreviewDialog but I don't seem to have that so I am using
PrintPreviewDialog.

It prints fine. But the PrintPreview dialog shows only one blank page.
Before I resort to posting code, is there some simple and/or common
mistake
I could have made which would explain why PrintPreview shows me only one
blank page?

Thanks, Bob

Sample code?

Thanks,

Seth Rowe

Jun 4 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by hartbypass | last post: by
8 posts views Thread by Edward Mitchell | last post: by
reply views Thread by Ram | last post: by
1 post views Thread by Vlad | last post: by
1 post views Thread by FNA access | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.