Windows Mobile开发简介

来源:互联网 发布:学编程 编辑:程序博客网 时间:2024/05/17 02:38
Windows Mobile开发简介
--简单介绍Windows Mobile上的应用软件开发过程

OS--Windows Mobile
Windows Mobile上的应用软件开发主要用Visual C++,VB,Visual C#。IDE用Visual Studio 2005以上版本。

HelloWorld
贴HelloWorld的代码在下面:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace DeviceApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void menuItem1_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        protected override void OnPaint(PaintEventArgs e)
        {
            //Create string to draw
            string drawString = "Hello World";

            //Create font and brush
            Font drawFont = new Font("Arial", 10, FontStyle.Regular);
            SolidBrush drawBrush = new SolidBrush(Color.Black);

            //Create point for upper-left corner of drawing.
            float x = 10.0F;
            float y = 10.0F;

            //Draw string to screen
            e.Graphics.DrawString(drawString, drawFont, drawBrush, x, y);
        }
    }
}

Visual Studio控制台输出:
'DeviceApplication1.exe' (Managed): Loaded 'C:/ProgramFiles/Microsoft.NET/SDK/CompactFramework/v2.0/Debugger/BCL/mscorlib.dll',No symbols loaded.
'DeviceApplication1.exe' (Managed): Loaded 'c:/visualstudio/deviceapplication1/deviceapplication1/bin/debug/DeviceApplication1.exe',Symbols loaded.
'DeviceApplication1.exe' (Managed): Loaded 'C:/ProgramFiles/Microsoft.NET/SDK/CompactFramework/v2.0/Debugger/BCL/System.Windows.Forms.dll',No symbols loaded.
'DeviceApplication1.exe' (Managed): Loaded 'C:/ProgramFiles/Microsoft.NET/SDK/CompactFramework/v2.0/Debugger/BCL/System.dll',No symbols loaded.
'DeviceApplication1.exe' (Managed): Loaded 'C:/ProgramFiles/Microsoft.NET/SDK/CompactFramework/v2.0/Debugger/BCL/System.Drawing.dll',No symbols loaded.
The thread 0x36956f82 has exited with code 0 (0x0).
The thread 0x96a4ccf2 has exited with code 0 (0x0).
The program '[36c74bde] DeviceApplication1.exe: Managed' has exited with code 0 (0x0).

资源:
Windows Mobile Developer Centre: http://msdn.microsoft.com/en-us/windowsmobile/default.aspx
上面关于Windows Mobile开发的资料一应俱全啦。。。

结论:
1. 速度奇快
2. 调试方便,感觉微软在产品(不管终端产品还是开发工具)的易用性方面做得还是很完美。。。

下篇:Palm OS开发简介。。。