Home > Microsoft .Net Development Tips > .NET Developer > Your first app with the .NET Compact Framework and smart device extensions
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET DEVELOPER

Your first app with the .NET Compact Framework and smart device extensions


Yateen Thakkar
06.15.2003
Rating: -4.00- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


Please let other users know how useful this tip is by rating it below. Do you have a tip or code of your own you'd like to share? Submit it here.


Microsoft's .NET Compact Framework was developed and designed for various smart devices like PDAs. The .NET Compact Framework is a subset of the .NET Framework that provides support for managed code and XML Web services. Hence, the developers who are familiar with the .NET Framework should have virtually no learning curve when creating applications for these smart devices. In this tip, we will create a small Winforms-based 'Hello World' application.

Installation of smart device extensions is quite easy and it is integrated with Visual Studio .NET, so you can directly create projects for smart devices as shown below.

Figure 1

Once we choose to create a smart device application, a Smart Device Application Wizard pops up asking us the Target Platform (Windows CE or Pocket PC) and the type of the application we need to create, as shown below.

Figure 2

For this tip, I have selected the Pocket PC environment and a Winforms-based application. Clicking OK lets Visual Studio .NET create a Winform-based application for us, opening the first form for us. Over here, we don't have all the controls available to us. Below is the list of controls you get by default.

Figure 3

We will drag and drop a button control on our form and write our code in the OnClick event of the button control.

Figure 4

Double clicking on the button control will take us to OnClick event method. We will just give a message box here that greets us with "Hello World."

private void button1_Click(object sender, System.EventArgs e) 
{ 
       MessageBox.Show("Hello World"); 
}

You can run this project by pressing F5. It will ask you where you want to deploy your application, on the actual device or the emulator. You can attach the real device to your PC for deployment. Here, we will chose to do it on the emulator. It first installs the Runtime environment for our managed application and then deploys our application on it. Installation of the Runtime is a one time activity.

Figure 5

We can see our 'Hello World' application on the emulator as shown below. Clicking on the button gives the message box saying "Hello World."

Figure 6

So, as you can see, if you are familier with VS.NET and the .NET Framework, creating applications for smart devices can be very easy.


Source: DotNetExtreme.com

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
.NET Developer
How to speed up Visual Studio 2008's slow WPF designer
How to list fonts in WPF using markup extensions and data templates
How to convince management to buy Microsoft Visual Studio 2008
Microsoft webcast series previews new Visual Studio 2010 features
New features in Windows 7 bring new UI considerations for developers
User Account Control (UAC): How to develop code for standard users
Introduction to Vista's user account control (UAC) for developers
Visual Studio 2008 code metrics tools will help keep code clean
Downloadable MSDN library released for VS 2008 SP 1
Widgetbox provides good example of how to use Facebook Developer Toolkit

.NET mobile application development
Create iPhone apps with .NET
Microsoft links BizTalk to RFID to Windows Mobile apps
.NET Micro Framework securing device software -- and attracting vendors
Web server brings ASP.NET to Windows CE
What .NET Compact Framework 3.5 brings to mobile app development
Book excerpt: Creating graphical output using the .NET Compact Framework
.NET Compact Framework: Less is more, especially on mobile devices
Control adds data trees to .NET Compact Framework apps
With Visual Studio plug-in, developers can build BlackBerry apps
Beginning .NET mobile application development

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts