Tag Archives: get
Get Primary Screen size

int width = Screen.PrimaryScreen.Bounds.Width; int height = Screen.PrimaryScreen.Bounds.Height;int width = Screen.PrimaryScreen.Bounds.Width; int height = Screen.PrimaryScreen.Bounds.Height;

Get local system users

Use the following code to retrieve local system users and some of their properties, using WMI and Management namespace ….

Get public/external IP address

Use the following code to get your wan/external/public ip address using http://dyndns.org site. try { System.Net.WebClient wc = new System.Net.WebClient();…

Get antispyware name in Windows using C#

To detect installed anti-spyware’s name in Windows we need ManagementObjectSearcher class. To use it, we have to add a reference…

Get firewall name in Windows using C#

To detect installed firewall’s name in Windows we need ManagementObjectSearcher class. To use it, we have to add a reference…

Get antivirus name on Windows using C#

To detect antivirus name in Windows we need ManagementObjectSearcher class. To use it, we have to add reference in the…

List all subfolders in C#

Use the following code to list all subdirectories of a folder. try { String[] allfolders = System.IO.Directory.GetDirectories("C:\", "*", System.IO.SearchOption.TopDirectoryOnly); if…

Get system hard drives with C#

Retrieve the available disk drives with GetLogicalDrives function. try { foreach (String lodi in Environment.GetLogicalDrives()) if (lodi != String.Empty) Console.WriteLine(lodi);…

Get system services with C#

To list system services, we are going to use ServiceController class. Add a reference to System.ServiceProcess namespace first. try {…

Get all opened windows in C#

With the following code you can get all opened windows for the current user. public void GetOpenWindows() { IntPtr hwnd;…

Previous Page · Next Page