我用这段代码来寻找显卡:
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("SELECT * FROM Win32_DisplayConfiguration");
string graphicsCard = "";
foreach (ManagementObject mo in searcher.Get())
{
foreach (PropertyData property in mo.Properties)
{
if (property.Name == "Description")
{
graphicsCard += property.Value.ToString();
}
}
}
但结果是:Nvidia Quadro K6000
如何找到所有的显卡?
最佳答案
the MSDN page 的第一行阅读:
[The Win32_DisplayConfiguration WMI class is no longer available for use as of Windows Server 2008. Instead, use the properties in the Win32_VideoController, Win32_DesktopMonitor, and CIM_VideoControllerResolution classes.]
所以我建议您从 Win32_VideoController 开始.
关于c# - 如何找到所有图形卡? C#,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37521359/