question

Sachin-2148 avatar image
0 Votes"
Sachin-2148 asked Castorix31 answered

update list of printers when new printers is added or delete/rename existing printers

i am showing all installed printers in listview of WPF using below codes

 foreach (string printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
             {
                 listview.items.add(printer);
             }


i want to update its listview UI runtimes without closing the application . when new printers is added or delete/rename existing printers .

Note: we can not use timer events to call list functions in each seconds.

dotnet-csharpwindows-wpf
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Castorix31 avatar image
0 Votes"
Castorix31 answered

Handle notifications, like WM_SETTINGCHANGE, WM_DEVICECHANGE (WM_DEVMODECHANGE if renamed)

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.