Hi All,
I have a combobox that is populated with a list of installed printers:
foreach (String strPrinter in PrinterSettings.InstalledPrinters)
{
cboPrinter.Items.Add(strPrinter);
}
this works fine and displays the printers installed on my machine, which is then stored to a mySQL db. The problem now is that when I come to delete the printer from the database table the cboPrinter.Text includes escape characters:
i.e \\share\printername in the combobox
becomes
\\\\share\\printername when the text is taken from combobox.text
Any ideas how to remove or get the litral string from the text.
Many thanks
Al
I have a combobox that is populated with a list of installed printers:
foreach (String strPrinter in PrinterSettings.InstalledPrinters)
{
cboPrinter.Items.Add(strPrinter);
}
this works fine and displays the printers installed on my machine, which is then stored to a mySQL db. The problem now is that when I come to delete the printer from the database table the cboPrinter.Text includes escape characters:
i.e \\share\printername in the combobox
becomes
\\\\share\\printername when the text is taken from combobox.text
Any ideas how to remove or get the litral string from the text.
Many thanks
Al