Win32_DisplayConfiguration in C# Asp.Net - ProgramIdea

Win32_DisplayConfiguration in WMI C# Asp.Net

Here we are retrieving Display Configuration details of Computer.

Use namespace System.Management

using System.Management;

 

public partial class Win_Win32_DisplayConfiguration  : System.Web.UI. Page

{

    protected void Page_Load(object sender, EventArgs e)

    {

ManagementObjectSearcher dis= new ManagementObjectSearcher( "select * from Win32_DisplayConfiguration" );

 

        foreach (ManagementObject obj in dis.Get())

        {

            Response.Write("DeviceName  -  " + obj["DeviceName" ] +  "</br>");

            Response.Write("Caption  -  " + obj["Caption" ] +  "</br>");

            Response.Write("PelsHeight  -  " + obj["PelsHeight" ] +  "</br>");

            Response.Write("PelsWidth  -  " + obj["PelsWidth" ] +  "</br>");

            Response.Write("BitsPerPel  -  " + obj["BitsPerPel" ] +  "</br>");

            Response.Write("DisplayFrequency  -  " + obj["DisplayFrequency" ] +  "</br>");

            Response.Write("LogPixels  -  " + obj["LogPixels" ] +  "</br>");

            Response.Write("SpecificationVersion  -  " + obj["SpecificationVersion" ] +  "</br>");

            Response.Write("DisplayFlags  -  " + obj["DisplayFlags" ] +  "</br>");

            Response.Write("SettingID  -  " + obj["SettingID" ] +  "</br>");

        }

    }

}

Demo

View output :

demoimage