how to determin is the selected printer a dot-matrix

  • Thread starter Thread starter Tancev Sasa
  • Start date Start date
T

Tancev Sasa

I am interesting how to determin is the selected printer a dot-matrix
printer or is it a laser printer

What property is relevant to detrmin what type is selected printer
 
Hi,

You can use the win32_printer classes markingtechnology property to find
out what type of printer you have. Add a reference to system.management

Dim moReturn As Management.ManagementObjectCollection

Dim moSearch As Management.ManagementObjectSearcher

Dim mo As Management.ManagementObject

moSearch = New Management.ManagementObjectSearcher("Select * from
Win32_Printer")

moReturn = moSearch.Get

For Each mo In moReturn

Dim intMarking As Integer = CType(mo("MarkingTechnology").ToString, Integer)

If intMarking >= 6 And intMarking <= 8 Then

Debug.WriteLine(mo("Name"))

End If

Next


http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmisdk/wmi/win32_printer.asp

Ken
 
Back
Top