1 首先建一个WebService(这里取名为:WebServiceDemo),用来被调用。
2 在WebService中写了两个简单的[WebMethod] 
  其中一个类似Hello World,另一个是返回DataSet的方法,代码与以前差不多,不在写。
3 再建一个新的"智能设备应用程序"项目,取名SmartDeviceApplicationDemo
4 为这个SmartDeviceApplicationDemo添加Web引用,这里需要注意的是,引用不能使用localhost
  应该使用计算机名字/IP,因为分属两个设备。例如,本项目中加引用时:
  使用 http://172.16.3.60/WebServiceDemo/Demo.asmx 而不是:http://localhost/WebServiceDemo/Demo.asmx
5 在SmartDeviceApplicationDemo项目中的窗体(取名Demo)加相应的控件:textBox,button,dataGrid,label
 在button的click事件中指定dataGrid的数据源应为DataTable(不知道为什么,因为DataSet,DataView不成功!)
My First SmartDevice Application ---Demoprivate void My_Btn_Click(object sender, System.EventArgs e)
}

6 部署: 因为没有Pocket PC 设备,这里选择"Pocket PC 2002  模拟器",会有相应提示。

最终的程序截图(点击完button后的效果)如下所示:
My First SmartDevice Application ---Demo


相关文章:

  • 2021-11-19
  • 2021-12-06
  • 2021-11-03
  • 2021-07-06
  • 2021-04-17
猜你喜欢
  • 2021-07-12
  • 2021-06-09
  • 2022-12-23
  • 2021-08-07
  • 2021-12-05
  • 2021-12-31
相关资源
相似解决方案