Print from a listbox using C#

Well, I decided to get this blog started by posting a C# tutorial, and try to lead you how to print the content of a listbox. If you have some data, and you’d like to print it without using all that report stuff, it’s an easy and safe way to go.

So let’s code…

I’m using Visual Studio 2010, but you should use the one you’re used to, I’m almost sure it’s going to work well in different versions too. So, first of all, create a new Project, a New Form Application one.

After that, fill your form with a listbox and one button, it should look like that.pic1

We must have data to print, so go to onLoad() method and fill your listbox.