Weather query tool by winform

Source: Internet
Author: User

I have been playing with databases for a while, but I haven't written a few lines in a mess.CodeNow,

I don't write any code for several days, so I am in a panic. I just made a weather query tool,

This tool can be used to query weather conditions in a specified city. In the end, it is a process of accessing WebServices,

Access WebServices to obtain the weather data, and then display it as OK, so relatively speaking,

Simple,

However, since we want to use WebServices to obtain weather data,

Of course, you also need to know where this WebServices is located,

The location of the WebServices is given below,

Http://www.webxml.com.cn/Webservices/WeatherWebService.asmx

Let's take a look at the results. To be honest, although the whole idea is very simple (that is, WebServices ),

However, I spent an hour in appearance, so it looks nice,

View my results first, and then summarize the winform.ProgramDevelopment Process and some WebService operation steps,

In order to take care of my location, Changsha, please check the weather conditions in Changsha,

The above is the demonstration of the entire mini-tool. Of course, this is mainly about the appearance and connotation, to be honest,

This is really not much connotation.

Let's take a look at the development process. I mainly introduce how to reference web services in Visual Studio,

In the winform project, right-click and select "Web reference". If this option is not available,

You can add a folder named "web references" to the project,

Right-click the project or the newly added "web references" folder, and the option "add web reference" appears,

The URL is specified as the address above, that is, the address of WebServices.

Http://www.webxml.com.cn/Webservices/WeatherWebService.asmx

Then "go"

Specify the Web reference name,

By now, you have successfully added a reference to the specified Web Service. The next step is to use it (encoding) in the project ),

I will not introduce these things because they are very simple,

You can go to the address of the web service you added to view details about the methods published by this web service,

You only need to follow these instructions to use it !!!

Of course, if you are a friend who is new to web services, if you do not know anything,

Leave a mailbox. I will send you the code and study it myself !!!

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.