安装方法

总结
系统安装LEADTOOLS虚拟打印机。
语法
c#
VB
c++
公共静态无效安装(PrinterInfoprinterInfo)
公共共享安装(_按值传递\ _printerInfo \ _作为PrinterInfo_)
公共:静态无效安装(PrinterInfo ^\ _printerInfo \ _)

参数

printerInfo
使用在安装打印机的信息。

讲话

从系统中卸载打印机,电话卸载方法。

例子
c#
VB
使用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))结束试一试结束公共NotInheritableLEAD_VARS公共常量ImagesDir作为字符串=“C: \ LEADTOOLS21 \ Resources \图片”结束
需求

目标平台

另请参阅

参考

打印机类

打印机成员

Leadtools.Printer作为sembly
188金宝搏的网址客服|支持|联系我们|知识产权的通知
©1991 - 2021领先的技术公司。保留所有权利。