what is system Diagnostics in c# ?

using system.Diagnostic ?
if you want to open any applications or web pages throw your app, you can simply  use system diagnostics
like opening web pages by clicking the buttons or open my computer etc
here is a simple code that opens web pages :


Namespace:   system.Diagnostics
function : process.start("ADDRESS");


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;

namespace windows_gadget_2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.youtube.com/?feature=ytca");

        }

        private void button2_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.metacafe.com/");
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.dailymotion.com/");
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Process.Start("http://blip.tv/");

        }

        private void button5_Click(object sender, EventArgs e)
        {
            Process.Start("https://www.google.ae/");
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Process.Start("http://en-maktoob.yahoo.com/?p=us");
        }

        private void button7_Click(object sender, EventArgs e)
        {
            Process.Start("http://uae.msn.com/?rd=1&ucc=AE&dcc=AE&opt=0&tc=0");
        }

        private void button8_Click(object sender, EventArgs e)
        {
            Process.Start("http://www.ask.com/");
        }

      

        }
    }








Comments

Popular posts from this blog

Adding navigation to your web pages with one line of php code

Voice Recognition Code with C#