爱问知识人 爱问教育 医院库

还是C#的问题

首页

还是C#的问题

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Drawing.Printing;

namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void 打印ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PrintDialog pd = new PrintDialog();
            System.Drawing.Printing.PrintDocument pdd = new System.Drawing.Printing.PrintDocument();
            pd.ShowNetwork = false;
            pd.PrintToFile = false;
            pd.Document = pdd;
            if (pd.ShowDialog() != DialogResult.Cancel)
            {
                pdd.Print();
            }
        }

        private void Form1_Load(object sender, EventArgs e)
        {

        }
    }
}
编译的是出现打印框的文件,可是打印框不跳出来,点打印按钮链接不上。

提交回答
好评回答
  • 2012-08-06 12:49:39
    1.确定是否执行了 打印ToolStripMenuItem_Click 这个函数?是不是你菜单绑定事件失效了。  菜单的名称最好使用英文。
    2.你可以放一个打印对话框控件到面板上,这样new的话,可能还缺少一些pd的属性设置?比如父容器这些?

    晓***

    2012-08-06 12:49:39

其他答案

类似问题

换一换
  • C#/.NET 相关知识

  • 电脑网络技术
  • 电脑网络

相关推荐

正在加载...
最新问答 推荐信息 热门专题 热点推荐
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200

热点检索

  • 1-20
  • 21-40
  • 41-60
  • 61-80
  • 81-100
  • 101-120
  • 121-140
  • 141-160
  • 161-180
  • 181-200
返回
顶部
帮助 意见
反馈

确定举报此问题

举报原因(必选):