473,406 Members | 2,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

PrintPreviewDialog

Hi all,

I've got a problem with a PrintPreviewDialog. It shows my document correctly
but when I try to print I only get the last page. Now when I use the print
function of my document directly it print's correctly. I've overriden the
OnPrintPage function of PrintDocument and for as far as I can see I've
correctly set he HasMorePages property.

Does anyone have an idea on how to fix this, or what I'm forgetting.

Thanks on advance,
Gabriel
Nov 16 '05 #1
1 2897
Gabriel,
You need to have something that resets the position of your data stream
when you start printing. You can override OnBeginPrint for this (and other
things). When you press the Print button on the PrintPreviewDialog the
Print method for your document is called again with the printer's graphics
as destination.

Ron Allen
"gabriel" <ar*******@yahoo.com> wrote in message
news:41**********************@news.skynet.be...
Hi all,

I've got a problem with a PrintPreviewDialog. It shows my document
correctly
but when I try to print I only get the last page. Now when I use the print
function of my document directly it print's correctly. I've overriden the
OnPrintPage function of PrintDocument and for as far as I can see I've
correctly set he HasMorePages property.

Does anyone have an idea on how to fix this, or what I'm forgetting.

Thanks on advance,
Gabriel

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Michael A. Covington | last post by:
By default, my PrintPreviewDialog is coming out too small. What is the best way to control its size and position? Ideally, I'd just like to maximize it. Thanks!
2
by: Randy | last post by:
Hello all, I'm trying to print using PrintPreviewDialog. What's happening is that the PrintPreviewDialog shows the correct information to be printed, but when I click the print icon, it prints a...
3
by: sachin | last post by:
How to customize PrintPreviewDialog, such that, addition of a new button, change the functionality of existing button should be possible programatically. Sample code will help a lot. Moreover, what...
0
by: Harry J. Smith | last post by:
I am using the PrintPreviewDialog Window Form from the Toolbox. It displays my RichTextBox contents correctly, but when I click on the Print icon on this form it prints one blank page and no text....
1
by: Jack E. Hardie | last post by:
When I call the PrintPreviewDialog, the resulting default window and zoom size are too small to read. I have figured out how to resize the window, but can someone help me with the call to preset...
1
by: Darrell Wesley | last post by:
Is there anyway to hook the PrintDialog to the printer icon on the PrintPreviewDialog? I know that you can print a document using the PrintDialog but it does not allow previewing and the...
1
by: jacopomeucci | last post by:
hi all. I've a problem with PrintPreviewDialog in c#. I've done a form with a ListViewControl and i tried to print the data contents in this listview. I've read the ListViewControl via a...
2
by: Richard MSL | last post by:
I am using PrintPreviewDialog to preview a file. There is a button that the user can press, which seems to print the file to the default printer. I would like to capture a click on that button so...
10
by: choupi | last post by:
Hello, Is there a way to call a printDialog from a printPreviewDialog (from print icon for example)? Indeed, the print icon in the printpreviewdialog prints directly the document without...
2
by: peter.mcclymont | last post by:
Hi There, I am trying to add the option to close a PrintPreviewDialog using the escape key. Firstly is there an option when creating a PrintPreviewDialog that would allow me to do that? I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.