I use VS2008 where I have a program where I have about 20 tabpages with datagridviews and textboxes.

But when it comes to printing windowsforms the sollution is just not good enough, and of course på programming skills is not good enough either.

I want to print out the data I hvave in my datagridviews together with my textbox values
and som text to explain what the values are.

I have come to the conclution that there is no easy way to do this, but I still have my hopes up that there is a way to do this.

have anyone of you done something like this before and can give me a little hint on how to go on?

I had some thought on maybe to use somethong like the tabcontrol or something but as I said my skills aint that good yet but maybe some of you can lead me in the right direction.

Recommended Answers

All 4 Replies

There are pretty good examples in Microsoft's MSDN site about printing with .NET.

CodeProject has this Form Print Control custom control for printing.

I believe that you'll find either one as an easy to use solution.

HTH

I checked out the link to code project form print control, but I do not know how I add this to my project. can someone please take a look at it and give me a hint??

All you have to do is to copy the DLL file somewhere. You can use your project's folder for example.

Open your project and select menu Project -> Add Reference
Select Browse tab and locate the DLL file. Once found and selected, press Ok button.
Open Toolbox if it's not open and press somewhere mouse's right button. From the menu select Choose Items. Locate the control from the .NET Framework Components. If you can't find it, use Browse button.

Now you should have Print Control ready to use so just drag it to your form.


HTH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.