I have a label that displays graphics card name, make and some other information, and I'm working on making it so that when its clicked, it opens Firefox and searches Google for the name of the card.
I tried using "let met Google that for you" but it searches for each work individually.
This is what I've tried so far and it kind of works but there's something wrong with it:
private void label13_Click(object sender, EventArgs e)
{
ManagementObjectSearcher Vquery = new ManagementObjectSearcher(
"SELECT * FROM Win32_VideoController");
ManagementObjectCollection Vcoll = Vquery.Get();
foreach (ManagementObject mo in Vcoll)
{
System.Diagnostics.Process CcleanerA = System.Diagnostics.Process
.Start(@"C:\Program Files (x86)\Mozilla Firefox\firefox.exe",
"http://google.com/?q="+(mo["name"].ToString()));
}
}
ok well i got it to search the right thing, but it searches it twice, in 2 tabs so whats wrong?
private void Vcard_Click(object sender, EventArgs e)
{
ManagementObjectSearcher Vquery = new ManagementObjectSearcher("SELECT * FROM Win32_VideoController");
ManagementObjectCollection Vcoll = Vquery.Get();
foreach (ManagementObject mo in Vcoll)
{
System.Diagnostics.Process.Start("http://www.google.ca/search?hl=en&q=" + mo["name"].ToString());
}
}