Tag Archives: internet

Map between host names and IP addresses in C#

When you enter a host name and click Go, the program uses the following code to look up the host and display the IP addresses associated with it. using System.Net; … // Display the entered host’s IP address. private void … Continue reading

Posted in internet, network, system | Tagged , , , , , , , , , , , , , , , | Leave a comment

See if Internet Explorer uses a proxy in C#

This example determines whether the system has Internet Explorer configured to use a proxy. Internet Explorer lets you specify proxy settings. In the Tools menu, select Internet Options. On the Connections tab, click the LAN Settings button. The goal of … Continue reading

Posted in internet, network, system | Tagged , , , , , , , , , , | Leave a comment

Graph currency rates over time in C#

This example, which shows how to graph currency rates for a specific currency, is a bit longish. Sorry about that. It uses Yahoo Query Language (YQL), which you can use to perform a wide variety of queries on Yahoo’s data. … Continue reading

Posted in finance, internet, mathematics, web | Tagged , , , , , , , , , , , , , , , , , , , , , , , | Leave a comment

Get currency exchange rates in C#

This example shows how you can get currency exchange rates from finance.yahoo.com. When it starts, the program uses the following code to get the currency exchange rates. // Get the currency symbols. private void Form1_Load(object sender, EventArgs e) { string … Continue reading

Posted in finance, internet, mathematics, web | Tagged , , , , , , , , , , , , , , , , , , , | 3 Comments

Get stock prices from different exchanges in C#

The example Get stock prices from the internet in C# shows how to download stock prices from download.finance.yahoo.com. It builds a URL of the following form to get prices for MCI, DIS, COKE, and PEP: http://download.finance.yahoo.com/d/quotes.csv?s=MCI+DIS+COKE+PEP&f=sl1d1t1c1 To get prices from … Continue reading

Posted in finance, internet, mathematics, web | Tagged , , , , , , , , , , , , , | 1 Comment

Make a temperature forecast in C#

The example Get weather forecast data in C# explains how to read weather forecast data from OpenWeatherMap. This example uses that data to list the forecast’s temperatures. The forecast data has (in part) the following structure. <weatherdata> … <forecast> <time … Continue reading

Posted in internet, interoperability, web, XML | Tagged , , , , , , , , , , , , | 3 Comments

Get weather forecast data in C#

There are many sites that offer weather condition and weather forecast services. All of the ones I found required you to have a developer key, although most of them have a free membership that works for a simple program like … Continue reading

Posted in internet, interoperability, web, XML | Tagged , , , , , , , , , , | Leave a comment

Display Google Maps for the computer’s location in C#

This example combines the techniques of the following two posts to display the computer’s current location in Google Maps: Use the Location API to find the computer’s latitude and longitude in C# Display Google maps for an address inside a … Continue reading

Posted in graphics, internet, system | Tagged , , , , , , , , , , , , , , , , , , , , , | 1 Comment

Use the Location API to find the computer’s latitude and longitude in C#

Before you try this, note the following caveats: This only works in .NET Framework 4.0 or later and Windows 7 or later. The operating system can grant or deny access to location information for a program. If the application is … Continue reading

Posted in internet, miscellany, system | Tagged , , , , , , , , , , , , , | 3 Comments

Display Google Maps for an address inside a form in C#

This was a lot easier until changes to Google Maps and the WebBrowser control added some rather annoying complications. The idea is simple. You use the techniques described in Display Google Maps for an address in C# to get a … Continue reading

Posted in graphics, internet, system | Tagged , , , , , , , , , , , , , , , | Leave a comment