473,624 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Printing multiple pages

Greetings.
I develop a multiple forms applications with Microsoft Visual Studio
C++ .NET 2003 and I'd like to know how can I print more than one page
in my application. For printing one page, I do:

private: System::Void button1_Click(S ystem::Object * sender,
System::EventAr gs * e){
if(printDialog1->ShowDialog() == DialogResult::O K){
printDocument1->PrintPage += new PrintPageEventH andler(this,
&Form1::printDo cument1_PrintPa ge);
printDocument1->Print();
}
}

private: System::Void printDocument1_ PrintPage(Objec t* sender,
PrintPageEventA rgs* ev){
ev->Graphics->Draw...//I make the drawings to print
ev->HasMorePages = false
}
It works perfectly. But I want to print two graphics pages, one after
another. Any help will be very appreciated.

Nov 17 '05 #1
2 1585
In the MSDN they tell me to use the SetMaxPage method in an override
CView::OnPrepar ePrinting function to print
more than one page. How could I do this? And must both pages be drawn
in the printDocument1_ PrintPage event?

Nov 17 '05 #2
In the MSDN they tell me to use the SetMaxPage method in an override
CView::OnPrepar ePrinting function to print
more than one page. How could I do this? And must both pages be drawn
in the printDocument1_ PrintPage event?

Nov 17 '05 #3

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

Similar topics

3
7176
by: John Sutor | last post by:
Does anyone know how to print multiple page documents? I can print from a test box or a one page document, but not one with multiple pages.
10
23302
by: Jeff B. | last post by:
Has anyone come across a decent algorithm for implementing word wrap features in .net printing? I have a small component that uses basic printing techniques (i.e. e.Graphics.DrawString in a PrintPage event of a PrintDocument object) to send some formatted text to the printer. However, if the lines are too long they run off the page rather than wrapping around. I'm sure I can spend the time and come up with a word wrapping algorithm but...
4
3728
by: Jay | last post by:
Still can't seem to find a solution to printing a lengthy datagrid on multiple pages including datagrid headeron each page. I am not using Crystal Reports or Reporting Services or VStudio. Any idea how this can be done? Any links, examples Thanks a lot.
2
8185
by: ray well | last post by:
hi, i need to print multiple pages on a printer. this is what i'm using now Sub Print() Dim PrintDoc As New PrintDocument AddHandler PrintDoc.PrintPage, AddressOf Me.PrintText Do While bPrintingNotDone PrintDoc.Print()
6
482
by: Bill | last post by:
Hi I am trying to get my listbox items to print if they stream past the one page mark. my code is working for one page of information (if the e.hasmorepages) is not there. But I am having trouble getting it to print on multiple pages. The second page will not print at all. Thanks in advance
6
4083
by: Siv | last post by:
Hi, I am getting into printing with VB.NET 2005 and want to implement the usual capability that a user can select a selection of pages. I have a report that is generated by my application that if the user wants all pages will produce 3 pages. I want to offer the user the ability to select via the print dialog that only pages 1 and 2 of it are printed or possibly pages 1 and 3 but not 2. At the moment I can produce all three pages...
0
1335
by: ben.agnoli | last post by:
I have written the below class for printing out large jpg files (1 page wide, multiple pages high) over multiple pages. The class will get instantiated multiple times at once by a windows service. For each page that the class prints, it gets visibly slower, when the third document, third page and onwards starts to print, it takes over 20 seconds a page, am I doing something wrong, or is this the wrong way to go about the task (could be...
18
11287
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing classes, for each of the checked rows in the GridView. This works fine in the Visual Studio 2005 development environment on localhost. But, when I move the page to the web server, I get the error "Settings to access printer...
0
2835
it0ny
by: it0ny | last post by:
Hi guys, thanks I am fairly new to this forum so I hope I chose the right place to post this question. I try to make my program printout a deposit's report. I created a class to store the printing printing data and the actual database data in a recordset. the class looks like this: Public Class BRPDD 'Balance Report PrintingDocument Data Public totalReceiptsNum As Integer Public totalLicFee As Double
1
2895
by: charitha0 | last post by:
Hi, Can any one help in printing a html table content (dynamically generated which spreads accorss multiple pages ) in landscape by default. The following code does not work when we have a table with lot of rows which spans accross multiple pages. Nothing shows up in print preview <html> <head> <object id="factory" viewastext style="display:none" classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"
0
8174
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8680
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8336
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7164
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5565
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.