Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Diagnostics;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WinForms_GoogleSearch
- {
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- textBox1.BackColor = Color.Yellow;
- if (Environment.OSVersion.Version.Major != 6.01)
- { textBox1.BackColor = Color.White; }
- string input = textBox1.Text;
- }
- private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
- {
- comboBox1.BackColor = Color.Yellow;
- if (Environment.OSVersion.Version.Major != 6.01)
- { comboBox1.BackColor = Color.White; }
- if (comboBox1.SelectedIndex == 0)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text);
- }
- if (comboBox1.SelectedIndex == 1)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text +" site:"+ comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 2)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 3)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- if (comboBox1.SelectedIndex == 4)
- {
- string input = textBox1.Text;
- Process.Start("www.google.bg/#newwindow=1&q=" + textBox1.Text + " site:" + comboBox1.Text);
- }
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- }
- private void label1_Click(object sender, EventArgs e)
- {
- label1.ForeColor = Color.Yellow;
- }
- private void label2_Click(object sender, EventArgs e)
- {
- label2.ForeColor = Color.Yellow;
- }
- private void label3_Click(object sender, EventArgs e)
- {
- label3.ForeColor = Color.Yellow;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment