c#
VB
c++
公共静态无效安装(PrinterInfoprinterInfo)
公共共享子安装(_按值传递\ _printerInfo \ _作为PrinterInfo_)
公共:静态无效安装(PrinterInfo ^\ _printerInfo \ _)
printerInfo
使用在安装打印机的信息。
从系统中卸载打印机,电话卸载方法。
使用Leadtools.Printer;使用Leadtools;公共无效InstallNewPrinter (){试一试{字符串printerName =“测试LEADTOOLS Printer3”;字符串printerPassword =“测试密码”;如果(Printer.IsLeadtoolsPrinter (printerName)){PrinterInfo tmpPrinterInfo =新PrinterInfo ();tmpPrinterInfo。PrinterName = PrinterName;Printer.UnInstall (tmpPrinterInfo);}字符串documentPrinterRegPath = "软件\ \技术有限公司\ \ 19 \ \打印机\ \ ";PrinterInfo PrinterInfo =新PrinterInfo ();printerInfo。MonitorName = printerName;printerInfo。PortName = printerName;printerInfo。ProductName = printerName;printerInfo。PrinterName = PrinterName;printerInfo。密码= printerPassword;printerInfo。RegistryKey = documentPrinterRegPath + printerName;printerInfo。RootDir =@ " C: \ LEADTOOLS 21 \ Bin \常见\ PrinterDriver”;printerInfo。Url =“//m.ahtuanjie.com”;printerInfo。PrinterExe =@ " D: \ LEAD15 \ Dist \ Bin20 \ DotNet4 \ Win32 \ Debug \”;printerInfo。AboutString =“LEADTOOLS打印机”;/ / printerInfo。AboutIcon = Path.Combine (LEAD_VARS.ImagesDir,@"\RasterPro.ico");Printer.Install (printerInfo);字符串strMsg =字符串.Format (“{0}安装成功完成”printerName);MessageBox.Show (strMsg“LEADTOOLS打印机演示”,MessageBoxButtons。好的,MessageBoxIcon.Information);}抓(PrinterDriverException练习){MessageBox.Show (字符串.Format (“其他错误:消息:{0}”ex.Message));}}静态类LEAD_VARS{公共常量字符串ImagesDir =@“C: \ LEADTOOLS21 \ Resources \图片”;}
进口Leadtools.Support.Examples进口Leadtools.Printer进口Leadtools公共子InstallNewPrinter ()试一试昏暗的printerName作为字符串=“测试LEADTOOLS打印机”昏暗的printerPassword作为字符串=“测试密码”如果(Printer.IsLeadtoolsPrinter (printerName))然后昏暗的tmpPrinterInfo作为新PrinterInfo ()tmpPrinterInfo。PrinterName = PrinterNamePrinter.UnInstall (tmpPrinterInfo)结束如果昏暗的documentPrinterRegPath作为字符串=“软件\ \技术有限公司\ \ 20 \ \打印机\ \”昏暗的printerInfo作为新PrinterInfo ()printerInfo。MonitorName = printerNameprinterInfo。PortName = printerNameprinterInfo。ProductName = printerNameprinterInfo。PrinterName = PrinterNameprinterInfo。密码= printerPasswordprinterInfo。RegistryKey = documentPrinterRegPath + printerNameprinterInfo。RootDir =“C: \ \ LEADTOOLS 21 \ \ Bin \ \共同\ \ PrinterDriver”printerInfo。Url =“http://www.LeadtoolsPrinterDriver.com”printerInfo。PrinterExe =Application.ExecutablePathprinterInfo。AboutString =“LEADTOOLS打印机”printerInfo。AboutIcon = Path.Combine (LEAD_VARS.ImagesDir,“\ \ RasterPro.ico”)Printer.Install (printerInfo)昏暗的strMsg作为字符串=字符串.Format (“{0}成功完成安装”printerName)MessageBox.Show (strMsg“LEADTOOLS打印机演示”,MessageBoxButtons。好的,MessageBoxIcon.Information)抓前女友作为PrinterDriverExceptionMessageBox.Show (字符串.Format (“其他错误:消息:{0}”,ex.Message))结束试一试结束子公共NotInheritable类LEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束类
帮助收藏
光栅net|C API|c++类库|HTML5 JavaScript
文档net|C API|c++类库|HTML5 JavaScript
医疗net|C API|c++类库|HTML5 JavaScript
医疗Web查看器net
188宝金博怎么下载
支持的平台上
net, Java, Android和iOS / macOS组件
C / c++类库的API
HTML5 JavaScript库
你的邮件已经发送到支持!有人应该联系!如果你的问题是紧急请回到聊天。
聊天时间:
周一——周五,上午6点等
谢谢你的反馈!
请填写表单重新开始一个新的聊天。
所有代理目前离线。
聊天时间:
周一-周五
早上8:30 - 6点
联系我们请填写这张表格,我们将通过电子邮件联系你。
