I am writing a small C# application to identify which type of display connect to pc
- A Monitor
- A TV screen
- A projector
I try to do with
Screen.AllScreens
EnumDisplayDevices()
but it does not help anything.
When I use
var mbs = new ManagementObjectSearcher("Select * From CIM_LogicalDevice");
ManagementObjectCollection mbsList = mbs.Get();
I can get device id:
DISPLAY\OTMFB0E\4&9C24ACE&0&UID16843008
DISPLAY\DELD058\4&9C24ACE&0&UID50725632
But there is not any value which is used to identify between a normal monitor and a projector.
Is there any way to do? Or which information will be different of these display types?
Win32_Desktopmonitor
, orWmiMonitorBasicDisplayParams
. You would need to use theCimSEssion
andCimInstance
classes in theMicrosoft.Management.Infrastructure
namespace to access them. This isn't something I've done before, so I can't really give you specifics. – Tungusic