You can now write () and get the real name of the monitor device. var device = new DISPLAY_DEVICE() įor (uint id = 0 EnumDisplayDevices(null, id, ref device, 0) id++)Ĭonsole.WriteLine(String.Format("", ex.ToString())) Įxamine carefully! this is what you looking for, The issue I had was when calling EnumDisplayDevices the second time I was setting iDevNum to id again, which meant I was trying to grab data from the wrong place, I then replaced this with 0, and it works perfectly, see below for the code. Where can I grab these names from? I have looked in the registry and cant seem to find them, so any help will be great. Now Windows knows what these monitors are, displays them in the Devices and Printers windows with the correct names, and also in the dialog for setting location and resolution. I have also tried both Win32_DesktopMonitor and EnumDisplayDevices, they all give me variations of //./DisplayXX OR Generic Monitor, whereas I know my displays names are SyncMaster and SM2333T. I have tried Screen, which just gives me //./DisplayXX. I am trying to grab the friendly name for the monitors on my system.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |