プリンタを設定します。
Namespace: YiaoWang.Vender.OfficeAssembly: YiaoWang.Vender.Office (YiaoWang.Vender.Office.dll 内) バージョン: 2.11.5.7 (2.11.5.7)
Syntax
C# |
---|
public void SetActivePrinter( string printerName ) |
Visual Basic |
---|
Public Sub SetActivePrinter ( _ printerName As String _ ) |
Parameters
- printerName
- Type: System..::..String
プリンタ名。
Remarks
■OSVersion
System.Environment.OSVersion.Platform.ToString
System.Environment.OSVersion.Version.Major
System.Environment.OSVersion.Version.Minor
・Win98SE : Win32Windows , 4 , 10
・XP Pro : Win32NT , 5 , 1
・2003Server : Win32NT , 5 , 2
■レジストリの例
・XP Pro 他:
"HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Devices\Canon LASER SHOT LBP-840"
・Win98SE:
"HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Print\Printers\Canon LASER SHOT LBP-840\Port"
Exceptions
Exception | Condition |
---|---|
YiaoWang.Vender.Office..::..YWCannotSetPrinterException | Application クラスの ActivePrinter プロパティを設定できません。 |