November 20th, 2009, 01:53 AM
C# system information
Hi, I'm trying to make a program in visual c# that displays computer information like graphics card model, graphics ram, system ram, cpu model, etc.
Basically I have this, but it doesn't seem to work. Any help would be appreciated. If any other easier methods available please leave a comment telling me of such thanks:
I am very new to C# programming but have basic knowledge of visual basic if I can do this using that.
public partial class Form1 : Form
private void Form1_Load(object sender, EventArgs e)
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("Select Name from Win32_CDROMDrive");
ManagementObjectSearcher searcher2 =
new ManagementObjectSearcher("Select Model from Win32_BaseBoard");
foreach(ManagementObject cdrom in searcher.Get())
foreach (ManagementObject model in searcher2.Get())
textBox1.Text = ("Name: " + cdrom.GetPropertyValue("Name").ToString());
textBox2.Text = ("Name: " + model.GetPropertyValue("Model").ToString());
Last edited by cilu; November 20th, 2009 at 02:05 AM.
Tags for this Thread
Click Here to Expand Forum to Full Width
This a Codeguru.com survey!