Breaking News

Tuesday, 30 December 2014

How to Display Google Maps Using C#.Net


How to Display Google Maps Using C#.Net

Design:

Open->VS2008/10->FileàNewàprojectàselect Window form Applicationàok

Create design using controls like Textboxes, Button, Labels and webBrowser1

Coding
In search Button Click

private void button1_Click(object sender, EventArgs e)
        {            StringBuilder url = new StringBuilder();            url.Append("https://maps.google.com/maps?q=");            if (textBox1.Text == "")            {                MessageBox.Show("Enter the Location");            }            else if (textBox2.Text == "")            {                MessageBox.Show("Enter the Criteria");            }            else            {                url.Append(textBox1.Text + "," + "+");                url.Append(textBox2.Text + "," + "+");                webBrowser1.Navigate(url.ToString());            }        }



Read more ...
Designed By Blogger Templates