Wpf System.Windows.Controls.PrintDialog предварительно выбранный PrintQueue (принтер) игнорируется ⇐ C#
-
Гость
Wpf System.Windows.Controls.PrintDialog предварительно выбранный PrintQueue (принтер) игнорируется
I want to show the PrintDialog from System.Windows.Controls. I also want to preselect a specific printer in some cases. I tried it this way:
PrintDialog printDialog = new PrintDialog(); printDialog.PrintQueue = new PrintQueue(new PrintServer(), printerName); and also this way:
PrintServer printServer = new PrintServer(); PrintDialog printDialog = new PrintDialog(); printDialog.PrintQueue = printServer.GetPrintQueue(printerName); But in both cases the default printer is preselected, not the printer I defined in printerName. Anyone an idea why this can be or what I can do better?
Источник: https://stackoverflow.com/questions/781 ... er-is-igno
I want to show the PrintDialog from System.Windows.Controls. I also want to preselect a specific printer in some cases. I tried it this way:
PrintDialog printDialog = new PrintDialog(); printDialog.PrintQueue = new PrintQueue(new PrintServer(), printerName); and also this way:
PrintServer printServer = new PrintServer(); PrintDialog printDialog = new PrintDialog(); printDialog.PrintQueue = printServer.GetPrintQueue(printerName); But in both cases the default printer is preselected, not the printer I defined in printerName. Anyone an idea why this can be or what I can do better?
Источник: https://stackoverflow.com/questions/781 ... er-is-igno
Мобильная версия