VB.Net Tutorial/GUI/Printers — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 12:57, 26 мая 2010
Add a printer process
Imports System.Environment
Imports System.Net
Public Class Tester
Public Shared Sub Main
Dim proc As New System.Diagnostics.Process()
Dim SystemDir As String = System.Environment.SystemDirectory
proc.Start("rundll32.exe", "shell32.dll,SHHelpShortcuts_RunDLL AddPrinter")
End Sub
End Class
Get installed printers
Imports System.Drawing
Imports System.Drawing.Drawing2D
Imports System.Windows.Forms
public class GetInstalledPrinters
public Shared Sub Main
Dim PrinterName As String
For Each PrinterName In System.Drawing.Printing.PrinterSettings.InstalledPrinters
Console.WriteLine(PrinterName)
Next
End Sub
End class