zoukankan      html  css  js  c++  java
  • 进程打开OFFICE,然后打印

            private void PrintDoc(string filename)
            {
                try
                {
                    System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
                    startInfo.UseShellExecute = true;
                    startInfo.Verb = "Print";
                    startInfo.CreateNoWindow = false;
                    startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
                    startInfo.FileName = filename;
                    System.Diagnostics.Process DocPt=System.Diagnostics.Process.Start(startInfo);
                    Thread.Sleep(10000);
                    DocPt.Kill();
                }
                catch(Exception E)
                {
                    MessageBox.Show(E.Message);
                }
            }
  • 相关阅读:
    类属性、实例属性
    多态
    重载
    多继承
    继承介绍以及单继承
    析构
    构造
    self
    方法
    属性
  • 原文地址:https://www.cnblogs.com/topcoder/p/2817621.html
Copyright © 2011-2022 走看看