View Single Post
  #4 (permalink)  
Old 08-21-2008, 4:41 PM
JohnH's Avatar
JohnH JohnH is offline
VB.NET Forum Moderator
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Dec 2005
Location: Norway
Age: 36
Posts: 8,138
Reputation: 876
JohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond reputeJohnH has a reputation beyond repute
Default

Oh, you didn't write this code, you just copied it and wonders what it does? The essence is consuming a webservice, see for example Creating and Consuming a Web Service, Part 2 . In short regarding your posted code a variable is declared to hold the service reference and a new instance is created:
Code:
Dim mForecast As New net.webservicex.www.WeatherForecast
then you can interact with the service methods:
Code:
Dim Wx As net.webservicex.www.WeatherForecasts = mForecast.GetWeatherByZipCode(zip)
LabelPlace.Text = Wx.PlaceName
The namespace (net.webservicex.www) could be different when you add the web reference.
__________________
See this thread about how to use forum markup codes for code blocks etc (present the problem/post properly )
Some useful links: Learning videoes, WMI Code Creator, MSDN, The Code Project, WindowsClient.net, ASP.net, W3 Schools, Regular-Expressions.info, GDI+ FAQ


DR. WEIR: Download it to a non-networked, firewalled computer.
TECHNICIAN: Yes, ma'am.
Reply With Quote