您好,欢迎光临本网站![请登录][注册会员]  
文件名称: 打印机总是打到75张就停,我这里有个软件可以解决这个问题
  所属分类: 网管软件
  开发工具:
  文件大小: 48kb
  下载次数: 0
  上传时间: 2009-05-20
  提 供 者: secr****
 详细说明: 源码:public partial class Form1 : Form { public Form1() { InitializeComponent(); this.cboPageMax.Text = GetRegistData(); this.lblMessage.Text = "你当前电脑打印最高页数为" + GetRegistData()+"页"; } private void button1_Click(object sender, EventArgs e) { this.lblMessage.Text = ""; string txtPageNumber = this.cboPageMax.Text.ToString().Trim(); foreach (char c in txtPageNumber) { if (!Char.IsNumber(c)) { lblMessage.Text = "这里只能输入数字整数"; return; } } try { Boolean boolSucsess = WTRegedit(txtPageNumber); //将打印最大页数保存到注册表里 int pageNumber = Convert.ToInt32(GetRegistData()); if (boolSucsess) { MessageBox.Show("成功将最高打印页数设置到" + pageNumber + "页"); } else { MessageBox.Show("打印最高张数还是" + pageNumber + "页,没有设置成功,权限不够,不能设置,请找网管或管理员在管理员administrator权限下设置"); } this.lblMessage.Text = "你目前电脑打印最高页数为" + GetRegistData() + "页"; } catch (Exception ex) { this.lblMessage.Text = "你电脑打印最高页数还是" + GetRegistData() + "页,没有设置成功"; MessageBox.Show("权限不够,不能设置,请找网管或管理员在高级权限下设置 " + ex); } } // Windows Registry Editor Version 5.00 //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer] //"PrintJobLimit"="50000" //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server] //"PrintJobLimit"="50000" private string GetRegistData() //注册表读取 {//Registry string registData; RegistryKey hkml = Registry.LocalMachine; //RegistryKey software = hkml.OpenSubKey("HKEY_LOCAL_MACHINE", true); RegistryKey node1 = hkml.OpenSubKey("SOFTWARE", true); RegistryKey node2 = node1.OpenSubKey("Crystal Decisions", true); RegistryKey node3 = node2.OpenSubKey("10.2", true); RegistryKey node4 = node3.OpenSubKey("Report Application Server", true); RegistryKey node5 = node4.OpenSubKey("InProcServer", true); RegistryKey node41 = node4.OpenSubKey("Server", true); registData = node41.GetValue("PrintJobLimit").ToString().Trim(); return registData; } private Boolean WTRegedit(string tovalue) //写到注册表 { try { RegistryKey hkml = Registry.LocalMachine; RegistryKey node1 = hkml.OpenSubKey("SOFTWARE", true); RegistryKey node2 = node1.OpenSubKey("Crystal Decisions", true); RegistryKey node3 = node2.OpenSubKey("10.2", true); RegistryKey node4 = node3.OpenSubKey("Report Application Server", true); RegistryKey node5 = node4.OpenSubKey("InProcServer", true); RegistryKey node41 = node4.OpenSubKey("Server", true); node5.SetValue("PrintJobLimit", (Convert.ToInt32(tovalue.Trim())+750).ToString().Trim()); //设置[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\InProcServer] //设置"PrintJobLimit"="50000" node41.SetValue("PrintJobLimit", tovalue.Trim()); //[HKEY_LOCAL_MACHINE\SOFTWARE\Crystal Decisions\10.2\Report Application Server\Server] //"PrintJobLimit"="50000" return true; } catch (Exception) { return false; } } ...展开收缩
(系统自动生成,下载前可以参看下载内容)

下载文件列表

相关说明

  • 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
  • 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度
  • 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
  • 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
  • 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
  • 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.
 输入关键字,在本站1000多万海量源码库中尽情搜索: