Question : How to print the contents of a listbox

I have a multi-line listbox whose content I want to print.

What is the simplest way to do this? (nothing fancy, just want to print the contents).

Answer : How to print the contents of a listbox


There is an error in the above code I posted. Correct bitmap creation line to

            Bitmap bitmap = new Bitmap(control.Width, control.Height); // use control.width and height

Then the above code will try to stretch the listbox to print bounds...see if the size after this change is ok....

otherwise try dividing the width and height by half to increase the scale like:

            Bitmap bitmap = new Bitmap(control.Width/2, control.Height/2);
Random Solutions  
 
programming4us programming4us