private void button1_Click(object sender, EventArgs e) ManagementObjectSearcher searcher = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController"); foreach (ManagementObject FlashDeviceObject in searcher.Get()) textBox1.Text = FlashDeviceObject["Name"].ToString(); textBox2.Text = FlashDeviceObject["PNPDeviceID"].ToString();