public static string GetPrinter() { string printerSelected = ""; PrintDialog printDialog1 = new PrintDialog(); //printDialog1.Document = printDocument1; DialogResult result = printDialog1.ShowDialog(WindowWrapper.GetForegroundWindowWrapper()); if (result == DialogResult.OK) { printerSelected = printDialog1.PrinterSettings.PrinterName; } return(printerSelected); }