Click here to Skip to main content
15,887,350 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi , I have a windows form with some buttons and a Picture Box , I have a Print button which i want the picture in the picturebox to be printed as it is when invoked. I have tried various methods and nothing i tried has worked... thanks in advance. The form is communicating with the printer but all i am getting is blank pages.:confused:


C#
public void toolStripPrintBtn_Click(object sender, EventArgs e)
        {
            if (listViewPageViewer.Items.Count > 0)
            {
                for (int i = 0; i < listViewPageViewer.Items.Count; i++)
                {
                    if (listViewPageViewer.Items[i].Checked)
                    {
                        printDialog.ShowDialog();
                        printDocument.Print();
                    }
                    else
                    {
                        MessageBox.Show("Please Select an Item From the List");
                    }
                }
            }
        }
Posted
Updated 8-Nov-10 0:56am
v3
Comments
shakil0304003 8-Nov-10 6:47am    
Not clear!!! you should give your code.

1 solution

You can see this link

Click

Click

Click
 
Share this answer
 
Comments
Rico_ 8-Nov-10 6:54am    
tried all those methods ... still not printing . and i am using C# only
shakil0304003 14-Nov-10 10:27am    
try this -> http://www.codeproject.com/Questions/127241/Print-Images-in-Csharp.aspx

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900