Creating Pocket PC Apps with the Smart Device Extensions

%DUMP SESSIONS--List Windows Sessions 阅读详情

Author: James Foster

Microsoft has recently announced the beta of the .NET Compact Framework, which is designed for the Pocket PC platform, as well as the Smart Device Extensions, an add-on to Visual Studio.NET to simplify the development of Pocket PC applications. You do not need to own a Pocket PC PDA to develop applications as the Smart Device Extensions contains an emulator for you to test out your applications. This article walks you through the development of a simple Pocket PC application, getting you started on the road to being a Pocket PC developer.

The Smart Device Extensions can be obtained here:

(C:If your .NET Framework Version is 1.1 or above ,you can pass this step.)
 
Creating a Project

The Smart Device Extensions integrate directly into the Visual Studio IDE. Once installed, they add a new project type for C# and VB.NET applications: the Smart Device Application. This is shown in the following screenshot:

This starts the Smart Device Application Wizard. You have the choose of targeting Windows CE .NET devices, or Pocket PCs. You also have the option of creating a WinForms application, a Class Library (assembly), or a Control Library. We'll opt to target the Pocket PC, and create a Windows Application.

We then click finish, and Visual Studio will have a Windows Form ready for us. This is very similar to a regular Windows Form, with the differences being a smaller Controls library to choose from, the "Device Controls", as well as the smaller form size. Pocket PCs typically use a 240x320 resolution.

 

As is typical in software development, the first application you write usually prints out "Hello World". Our application will feature a textbox and a button. The user can enter in their name, and clicking the button will show a messagebox greeting them by name.

 

First, drag a label, textbox, and button onto the form from the Device Controls toolbar. Rename the textbox to txtName, and the button to btnSubmit. Double-click the submit button. This will generate a skeleton wrapper for the click event. Enter in the following line of code:

 

MessageBox .Show ( "Hi " + txtName .Text );
 
C#VB

The following screenshot shows our form loaded in the Visual Studio.NET environment.

Testing in the Emulator

Now that we have our simple application, let's move onto testing it. From the Build menu, select Build Solution (or press ctrl+alt+B). You should have no compile errors. Next, on the Debug menu, select Start (or press the "Play" toolbar icon). This will bring up the Deployment dialog. You can deploy and test your application on a real Pocket PC attached to your computer, or you can use the emulator. We'll select the Pocket PC Emulator and click Deploy. If this is your first application, the emulator will load the .NET runtime into it's image. The Emulator will load the Today screen, and then Visual Studio will continue to load your application. You can follow the progress of the load in Visual Studio's status bar. Eventually, the application will load in the emulator. Enter your name in the textbox, and click the button. You should get a messagebox greeting your by name, as shown in the screenshot below.

As you can see, with the Smart Device Extensions, writing Pocket PC Applications is a snap. Now you are ready to explore more of the .NET compact framework, and write your own applications.

介绍一个用Kivy开发太空游戏的站点 kivyspacegame http://kivyspacegame.wordpress.com/ 阅读详情

相关推荐

EVC4.0安装时碰到的问题

首先提供几个下载地址(虽然都是微软提供的,但是不一定好找呀)^_^  1、EVC4.0  http://download.microsoft.com/download/c/3/f/c3f8b58b-9753-4c2e-8b96-2dfe3476a2f7/eVC4.exe  2、evc4sp4.exe  http://download.microsoft.com/download/a/7/3/a

4844

实现蓝色理想的"运行代码"

效果如下,代码在下面:  代码:新建网页 1function runCode() //定义一个运行代码的函数,{var code=RunCode.value;//要运行的代码,即textarea的内容,RunCode是textarea的name。var newwin=window.open(,,); //打开一个窗口并赋给变量newwin。newwin.open

3352

版权声明的正确格式

看了不少朋友的个人网站,有一个小问题,似乎很多朋友都忽略了,那就是版权声明的写法。虽然那只是一小行字,不过作为设计师也好,作为个人的爱好也好,版权的标志都是满重要的。从法律角度看,加入了伯尔尼公约的国家,版权保护是随着作品(无论是文字,还是图片)的问世的即刻就得到版权的保护的,并不是必须要声明。但是作为惯例,这一小行文字还是有很好加强意识,提醒浏览者,所观看的内容是受到版权保护

4166

实现PPC点击窗口X按钮后关闭程序

.net 2003 C# 一般在点机窗口的X按钮后程序不会退出,而是自己最小化,等待系统管理 只要在Form_Load里加入下列代码即可实现点击后退出: this.ControlBox = true;this.MinimizeBox = false;

2877

PPC移动设备编程(1)

    这次的期末考试,C考出了一个非常另类的成绩。趁着父母高兴,买了个PDA。在同龄人还处于炫耀文曲星时代的时候拥有一个PDA,哈哈,C的虚荣心得到了巨大的满足。开个玩笑。    作为一个半成品的程序员,C玩儿了几天后便想到,应该试试为他编编程。OK,那么,如果你有同样的想法,我们就开始巴。 首先接触几个专业术语:WinCE:Windows Compact Edition的缩写。他是一个通用版本

2417

《XML指南》下载[CHM格式]

写在前面的话本文的英文版刊登在http://www.w3schools.com/xml/上,由Blueidea的小奀将其译成中文。对XML 编码一节,原文已经不适合中文读者,于是做了一些修改,对于初学者来说这是一个很不错的入门教程。如果您有什么疑问,请给小奀发E-mail:ordm@163.com。下载地址:http://www.hsyj.pudong-edu.sh.cn/source

2394

简述Win CE开发特性及忠告(1)

Windows CE与平台开发 最近一段时间,移动设备开发越来越多的成为了程序员社区的话题。移动设备主要包括智能手机和PDA,是嵌入式开发中很重要的一个方向。在智能手机领域被大多数手机厂商支持的J2ME无疑是领头羊,微软CE平台的SmartPhone也逐渐成为关注焦点。一直不温不火的PDA市场,也在行业应用领域有所收获,Pocket PC由于其开发与Windows平台的一致性而得到了开发人

2138

C修改的XML+Flash导航菜单

前段时间本来想参加市里的网页比赛的,由于期中考试不理想,计划搁浅了。今天整理文件的时候翻出来了这个东西。这个菜单的Flash源文件是在FlashEmpire下载的,修改了一下,让他可以支持XML,最多可以添加9个菜单。下载: 500)this.width=500" border="0"/>FlashButton.rar 

2090

玩蓝牙,先要识蓝牙!

玩蓝牙,先要识蓝牙!作者:大有   蓝牙是什么?蓝牙可以做什么?你每次听到这个耳熟的科技名称时,可能无法具体想   我国手机专利状况分析   愚人节,你想整谁?    小户型主阵容揭晓   多媒体互动学英语    像它是什么样的。事实上,蓝牙技术能让许多3C产品变得更加方便好用,它不但可以取代传统的传输线连接方式,而且还能有许多新鲜的玩法。   在这里,我们将先带你快速了解蓝牙的工作原理,对蓝牙有

1998

世界编程大赛一等奖作品

世界编程大赛一等奖作品   --代码结束--  e100 33 f6 bf 0 20 b5 10 f3 a5 8c c8 5 0 2 50 68 13 1 cb e 1f be a1 1 bf 0 1  e11b 6 57 b8 11 1 bb 21 13 89 7 4b 4b 48 79 f9 ad 86 e0 8b c8 bd ff ff e8 20  e134 0 3d 0 1 74 1a

1963

为刀刀演示的的悬浮广告代码

新建网页 1 To 刀刀 initAd(); function initAd() { document.all.AdLayer.style.posTop = -200; document.all.AdLayer.style.visibility = visible MoveLayer(AdLayer); } function MoveLayer(layerName)

1956

缓冲区溢出(buffer overflow)机理分析

本文内容仅用于教育目的。作者不保证内容的正确性。任何情况下,作者不 为由于使用文中内容而引起的任何破坏或问题负责。使用本文内容的风险由使用 者自己承担。                      计算机应用工作室1997年版权所有             ##########################################                 缓冲区溢出(buffer

1638

"运行代码"按钮的实现 [第二版]

根据小雨朋友的意见修改了一下,给runCode加了个参数,不会显的所谓“太死”:(第一版:http://blog.csdn.net/catally/archive/2004/11/13/180487.aspx)代码:新建网页 1function runCode(txTarget) //定义一个运行代码的函数,{var code=txTarget.valu

1613

几种鼠标经过提示的方法

由于代码复杂,不好转载过来所以给出两个联接,来自蓝色理想:http://www.blueidea.com/tech/web/2003/1463.asphttp://www.blueidea.com/tech/web/2004/1969.asp

1600

ASP.Net中的MD5加密

其实在ASP.Net编程中,不用调用md5.asp来加密数据。在DotNet中有自带的类:System.Web.Security.HashPasswordForStoringInConfigFile()  public string md5(string str,int code)  {   if(code==16) //16位MD5加密(取32位加密的9~25字符)   {    retur

1462

顺序表(Sequential List)详解:从数组到 C 语言实现

顺序表是用连续存储单元依次存储数据元素的线性结构,数组则是其最常见的实现方式,两者本质相同、仅视角不同——数组关注物理存储,顺序表关注逻辑关系。顺序表支持随机访问 $O(1)$,但插入删除需移动元素,效率为 $O(n)$。本文用 C 语言静态数组完整实现了顺序表的初始化、增删改查操作,帮助初学者在不涉及指针的前提下理解其核心原理,为后续学习动态顺序表打下基础。

Guangyu536的博客 288

windows 驱动实例分析系列: HidHide驱动分析-HidHideCLI 篇(三)

`HID.cpp` 模块实现了完整的设备枚举与信息采集,这些功能与 GUI 版本共享相同的核心逻辑,但在输出格式上存在差异——CLI 版本输出 JSON,而 GUI 版本填充树形控件。

王马的博客 127

【回溯】【中等】全排列/子集/电话号码的字母组合/组合总和/括号生成/单词搜索/分割回文串

【待更新】

2301_81831660的博客 41
上一篇: C#计算一个文件夹的大小
下一篇: [手机]红色警报 特别推荐 请您按键 : * # 0 6 #
catally
博客等级 码龄22年 4粉丝 53原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值