从图片盒打印 [英] Print from a Picturebox

查看:94
本文介绍了从图片盒打印的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有一些按钮的窗口窗体和一个图片框,我有一个打印按钮,我希望在调用时按原样打印图片框中的图片.我尝试了各种方法,但我尝试过的任何方法都没有效果……在此先感谢.表单正在与打印机通信,但是我得到的只是空白页.:confused:


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:


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");
                    }
                }
            }
        }

推荐答案

您可以看到此链接

点击

点击

单击
You can see this link

Click

Click

Click


这篇关于从图片盒打印的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆