Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / Drawing / May 2004

Tip: Looking for answers? Try searching our database.

Printing GDI drawings

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Flare - 27 May 2004 22:34 GMT
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
Dmitriy Lapshin [C# / .NET MVP] - 28 May 2004 08:11 GMT
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.

> Hi. I have made a simple painting applcation.
>
[quoted text clipped - 9 lines]
> Thanks in regards
> Anders
DNE - 29 May 2004 05:49 GMT
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: ori@s-e-a.com.au
Your acceptance of the license agreement will be required.

Ori

> Hi,
>
[quoted text clipped - 25 lines]
> > Thanks in regards
> > Anders

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.