Hello everyone I hope this is the right place for this Im trying to change default Printer back and forth depanding on what I print through Code so I search the web and found this Code
public static class MyPrinters
{
[DllImport("winspool.drv", CharSet = CharSet.Auto, SetLastError = true)]
public static extern bool SetDefaultPrinter(string Name);
}
And this what I set before printing
MyPrinters.SetDefaultPrinter(PrinterWhitePage);
MyPrinters.SetDefaultPrinter(PrinterLogoPage);
The code of switching the Default Printer works i see in Control Panel the Green V is moving between the printer but as soon as I print 1 page even though the Default Printer is changing it always will print form the 1st chosen printer to fix this i need to exit to program and set the second printer is there any code line to force Refresh Default Printer without reopen the program?
Please Help