how to test if a printer is installed

  • Thread starter Thread starter Pascal
  • Start date Start date
P

Pascal

Hello, I started in .Net and I do not know how to test the
presence of printers installed on the PC before printing.
If printers exist then
'do that
else
do this
end

thank you for your help
Paschal
 
Pascal said:
Hello, I started in .Net and I do not know how to test the presence of
printers installed on the PC before printing. If printers exist then
'do that
else
do this
end

thank you for your help Paschal


if (System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count > 0)
// do that
else
// do this

But your code looked like VB...?
 
if (System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count > 0)
// do that
else
// do this

But your code looked like VB...?

In my idea this is pseudo code.

I won't call this VB, this did exist long before there was VB.

Cor
 
if (System.Drawing.Printing.PrinterSettings.InstalledPrinters.Count > 0)
// do that
else
// do this

But your code looked like VB...?
thanks for your help

It was pseudo code (herited from a little vb6 knowledge)so you were right: I
know more things in VB than in C#. It's just a hobby to build some softs for
my young pupils.
pascal
 
Back
Top