一、qq是否在线
1、添加Web引用 qqOnlineWebService
cn.com.webxml.www.qqOnlineWebService shelly1 = new NIIT1109.cn.com.webxml.www.qqOnlineWebService();//qq是否在线 private void button1_Click(object sender, EventArgs e) { Text = shelly1.qqCheckOnline("2286706415"); listBox1.Items.Add(Text); }
二、查看城市天气 WeatherWebService
1、添加Web引用
cn.com.webxml.www1.WeatherWebService shelly = new NIIT1109.cn.com.webxml.www1.WeatherWebService();//天气 private void button2_Click(object sender, EventArgs e) { string[] weas = shelly.getWeatherbyCityName("苏州"); foreach (string wea in weas) listBox1.Items.Add(wea); }