473,385 Members | 1,798 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,385 software developers and data experts.

Printing GDI drawings

Hi. I have made a simple painting applcation.

I have a mainform wich creates a class called drawingPanelwich inherit from
Panel. In the drawingPaneli have overriden onPaint an the the painting.

Now on my mainform i have a button called Print. I know how to print
.....PrintPageEventArgs e (e.graphics......)

But HOW do i get the things i ave painted on the drawingPanel? I cant see
how i can access this temporary paint job. How is this normally done?

Thanks in regards
Anders
Nov 16 '05 #1
2 4121
Hi,

I'd recommend to have a single painting routine instead which would be able
to draw on any given Graphics. This way, you would use the single routine to
draw on the panel as well on the e.graphics within the PrintPage event
handler.

Bear in mind though that the resolution on these Graphics can be quite
different - a picture looking quite big on the screen can look much smaller
when printed. So the routine should possibly adjust for different DPIs and
so on. I am not an expert in this field, unfortunately, so I cannot give any
detailed advice on how to allow for printer/screen resolution. I think you
can post such questions to the WinForms/GDI+ newsgroup to get more help from
experts there.

"Flare" <no****@sorry.dk> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi. I have made a simple painting applcation.

I have a mainform wich creates a class called drawingPanelwich inherit from Panel. In the drawingPaneli have overriden onPaint an the the painting.

Now on my mainform i have a button called Print. I know how to print
....PrintPageEventArgs e (e.graphics......)

But HOW do i get the things i ave painted on the drawingPanel? I cant see
how i can access this temporary paint job. How is this normally done?

Thanks in regards
Anders


Nov 16 '05 #2
DNE
The framework extensions libraries I have developed contain a method to
print images (single command!), optionally with pre-defined settings. It
will scale the image to fit the allocated area.

Fully documented. Requires .NET framework 1.1 or later.

You will be allowed to use the libraries in any application - private or
commercial, and distribute them as part of your application, royalty-free.

E-mail me for your free copy: or*@s-e-a.com.au
Your acceptance of the license agreement will be required.

Ori
"Dmitriy Lapshin [C# / .NET MVP]" <x-****@no-spam-please.hotpop.com> wrote
in message news:#B*************@TK2MSFTNGP12.phx.gbl...
Hi,

I'd recommend to have a single painting routine instead which would be able to draw on any given Graphics. This way, you would use the single routine to draw on the panel as well on the e.graphics within the PrintPage event
handler.

Bear in mind though that the resolution on these Graphics can be quite
different - a picture looking quite big on the screen can look much smaller when printed. So the routine should possibly adjust for different DPIs and
so on. I am not an expert in this field, unfortunately, so I cannot give any detailed advice on how to allow for printer/screen resolution. I think you
can post such questions to the WinForms/GDI+ newsgroup to get more help from experts there.

"Flare" <no****@sorry.dk> wrote in message
news:ut**************@tk2msftngp13.phx.gbl...
Hi. I have made a simple painting applcation.

I have a mainform wich creates a class called drawingPanelwich inherit

from
Panel. In the drawingPaneli have overriden onPaint an the the painting.

Now on my mainform i have a button called Print. I know how to print
....PrintPageEventArgs e (e.graphics......)

But HOW do i get the things i ave painted on the drawingPanel? I cant see how i can access this temporary paint job. How is this normally done?

Thanks in regards
Anders

Nov 16 '05 #3

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

Similar topics

9
by: Jody Gelowitz | last post by:
I am trying to find the definition of "Safe Printing" and cannot find out exactly what this entitles. The reason is that I am trying to print contents from a single textbox to no avail using the...
0
by: J. H. Lernbeiss | last post by:
Hallo! I can show Autocad drawings in a Access Form useing Autodesk Volo View Control field. But I can not print out this fields. The data of the drawing are stord on a table with path and...
7
by: ChadDiesel | last post by:
Hello everyone, I'm having a problem with Access that I need some help with. The short version is, I want to print a list of parts and part quantities that belong to a certain part group---One...
0
by: Marcelo | last post by:
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...
1
by: Fred Nelson | last post by:
I'm a newby and I'm writing my first VB.NET print program! I need to change the default left and right margins for my printed output "e" is my "System.Drawing.Printing.PrintPageEventArgs By...
6
by: Fredmanglis | last post by:
I've been teaching myself the C++ Programming language. So far however, I have not come across any useful tutorials on how I can output coloured text, create drawings or graphics in C++. All I can...
4
by: rdemyan via AccessMonster.com | last post by:
My application deals with building information. Users may want to view autocad drawings for a particular building. The problem is that the central server is so slow for some users that it could...
1
by: phil | last post by:
Hope someone can help We need to integrate the following into our C# (.net) product. load DWG/DWF drawings from external files
9
by: she_prog | last post by:
Dear All, I need to save the content of a panel to a bitmap. The panel can have many child controls which also need to be saved. The problem would be solved if I could have the panel saved to a...
2
by: PJ6 | last post by:
I am rendering a few graphs with GDI+ and sending images to a web page. What image format is lightweight and the best for presenting line drawings sharply and without compression artifacts? GIF?...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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...

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.