Created
October 15, 2023 06:01
-
-
Save SarasArya/21b899dda3fb6e4a6c4027a86e16b749 to your computer and use it in GitHub Desktop.
Printer Settings in C#
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
string selectedPrinter = ""; | |
selectedPrinter = BilzoLogs.ReadValueFromRegistry("PrinterName"); | |
m_prefPaperSize = BilzoLogs.ReadValueFromRegistry("PaperSize"); | |
m_centerAlign = BilzoLogs.ReadValueFromRegistry("CenterAlign"); | |
m_printType = BilzoLogs.ReadValueFromRegistry("PrintType"); | |
int selectedIndex = -1; | |
int paperSizeSelIdx = -1; | |
int index = 0; | |
foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters) | |
{ | |
if (printer != "Bilzo") | |
{ | |
printersCombo.Items.Insert(index, printer); | |
if (selectedPrinter == printer) | |
selectedIndex = index; | |
index++; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment