How To Make Windows Mobile App
Introduction
Microsoft Visual Studio 2008 Professional Edition or ameliorate provides a development environment that allows you lot to build applications in either native code (C / C++) or managed code (C# / Visual Basic .NET) for Windows Mobile devices.
This article provides information to correctly install Visual Studio 2008 and boosted Windows Mobile Software Development Kits in order for you to create your first Windows Mobile application, targeting a Windows Mobile 6 device. This article also introduces the Device Emulator which allows you to test your Windows Mobile applications without the need to take a physical Windows Mobile device available.
Installation of Visual Studio 2008 and additional SDKs
Allow the states assume you have a brand new development machine that you want to use to develop applications for Windows Mobile devices. The first thing you want to do is install Visual Studio 2008 and, depending on the speed of your Internet connectedness, you might also desire to install all MSDN assist files locally on your development system. If yous don't ain Visual Studio 2008, y'all can download an evaluation version of Visual Studio 2008 Professional. Installing both Visual Studio 2008 and MSDN Library for Visual Studio 2008 is pretty straightforward. After a number of installation prerequisite files take been installed on your development machine, immediately after you lot install the DVD containing Visual Studio 2008 Professional Edition in the DVD drive, you volition see a setup wizard. By just selecting the default options, you will install Visual Studio 2008 with Smart Device Development enabled.
After the installation of Visual Studio 2008 and the MSDN Library for Visual Studio 2008, there is one more than thing you might want to do. If y'all have a expect at the installation dialog for both Visual Studio 2008 and the MSDN Library, yous can see a hyperlink to check for updates. It is my recommendation to exercise so, since this guarantees y'all to install the latest security updates, depending on the Operating System you are running on.
Adjacent, yous need to download and install Visual Studio 2008 Service Pack 1. First, a relatively small installer will be downloaded, which downloads all necessary Service Pack ane features, depending on the way you installed Visual Studio 2008. Depending on your download speed, this might exist a lengthy operation.
Visual Studio 2008 should now piece of work properly on your development machine. To verify correct installation of Visual Studio 2008, information technology is now time to first it from the Windows Start menu. After Visual Studio 2008 has started, you can create a new Windows Mobile application by clicking File - New Project. In the New Project dialog that is displayed, you tin now select to create a Smart Device project, either in C# or in Visual Bones .Net. Let's assume yous want to create a Windows Mobile 6 application written in C#. To practise this, expand the C# node in the Project Types window and select Smart Device. Visual Studio 2008 volition give your project a default proper name and a default storage location. Optionally, you tin give your project a name, and y'all can specify a location where your projection will be stored. This is all the information you need to provide in this dialog. To continue creating your application, you must at present click the OK button in the New Project dialog. This action will open the Add together New Smart Device Project dialog in which you can specify what type of project you desire to create and what additional settings you desire for your project.
Before you keep creating your offset Windows Mobile application, expand the Target Platform combo box. If yous but installed a clean copy of Visual Studio 2008, you will see that you can create projects for a limited number of devices and that there is no support to create Windows Mobile half-dozen projects. In order to create Windows Mobile 6 projects, you must first install one or both of the Windows Mobile half-dozen SDKs. An SDK or Software Development Kit adds documentation, sample lawmaking, header and library files, emulator images, and tools to Visual Studio that let you lot build applications for a particular target. Y'all demand to install these SDKs separately because they were released independent and at a subsequently time than Visual Studio 2008. More SDKs and additional emulator images might be available at a later on time. To easily discover new SDKs, at that place is a hyperlink to the Windows Mobile Developer Center on the Add together New Smart Device Project dialog, from which you tin download and install additional SDKs and emulator images. To make sure that the SDKs install properly, y'all must make sure to close Visual Studio 2008.
Note: If you have the Windows Mobile six SDKs already installed, for instance, to target Windows Mobile 6 devices from inside Visual Studio 2005, yous demand to either reinstall or repair the SDKs after installing Visual Studio 2008. If you don't do this, you cannot target Windows Mobile vi devices from inside Visual Studio 2008.
Figure 1 - New Smart Device Projection dialog
If you have installed one or both of the Windows Mobile 6 SDKs, you are prepare to create your get-go awarding for a Windows Mobile 6 device. In society to echo the steps shown in this document, y'all at least will demand to install the Windows Mobile half-dozen Professional SDK.
Creating your first Windows Mobile application
With all the tools being installed, you are at present ready to create your outset Windows Mobile 6 application. For this application, yous will target the Windows Mobile 6 Professional SDK. However, you can build applications and solutions for a large number of Windows Mobile devices and for generic Windows CE devices. With both Windows Mobile 6 SDKs installed, you lot tin can develop solutions for the post-obit devices using Visual Studio 2008:
- Pocket PC 2003
- Windows CE (non Windows Mobile devices)
- Windows Mobile 5.0 Pocket PC
- Windows Mobile 5.0 Smartphone
- Windows Mobile 6 Professional
- Windows Mobile 6 Standard
With Visual Studio, you can target two different versions of the .NET Compact Framework, a subset of the total .NET Framework that is used to write managed applications for Smart Devices. The following versions of the .NET Compact Framework can exist targeted with Visual Studio 2008:
- .Internet Compact Framework Version 2.0
- .Cyberspace Meaty Framework Version 3.v
If you need to develop applications for older devices, or if you need to target a previous version of the .NET Compact Framework, you must utilize Visual Studio 2005. This is beyond the scope of this article, just you tin can install Visual Studio 2005 and Visual Studio 2008 adjacent.
To create a new Smart Device Project
- Open Microsoft Visual Studio 2008.
- On the File menu, click New, and then select Project.
- In Projection types, select Visual C#, and then select Smart Device.
- Specify a new proper noun, location, or solution proper noun for your Smart Device Project, and and then click OK. An additional dialog similar to Effigy 1 volition open in which you lot can specify the blazon of projection you want to create, the SDK you want to target, and the version of the .NET Compact Framework you want to use.
- In the Target Platform list, select Windows Mobile six Professional SDK.
- In the .NET Compact Framework version list, select .NET Meaty Framework Version 3.5.
- In the available Templates, select Device Application.
- Click OK to create a new Smart Device solution project, which includes the post-obit:
- References to the necessary assemblies
- AssemblyInfo.cs, a file that enables you to specify visitor, production information, and version information for the Smart Device awarding
- Form1.cs, a Visual C# lawmaking file that you lot can use to create the initial user interface for your Smart Device application (you lot tin either view the source lawmaking in an edit window or the form in designer mode)
- Program.cs, a Visual C# code file containing the entry point of your application
If you have created your outset Smart Device project successfully, you will see the Form Designer in Visual Studio 2008, displaying your empty course.
Figure 2 - Visual Studio 2008 Form Designer
You can run into several important areas within Visual Studio 2008 in Effigy ii. The big area on the left hand side of Visual Studio 2008 that shows a skin of a Windows Mobile device is the Form Designer. You tin add together user interface controls by dragging them from the Toolbox and dropping them on the desired location inside Form1. The upper window on the right hand side of Visual Studio 2008 is the Solution Explorer. Information technology contains a tree view of all your projects and files within projects that are part of the solution you are working on. Nether Solution Explorer, you can come across the Properties window, which allows you to set backdrop for currently selected user interface controls.
Note: If the Properties window is not visible in your copy of Visual Studio 2008, you can go far visible past selecting View and so Properties Window on the Visual Studio 2008 menu.
Some other of import part inside your working surface area of Visual Studio 2008 is the Target Device dropdown box, which is marked by a red oval in Figure 2. Here, you can select to which device or which particular device emulator your application will exist deployed one time y'all are washed developing information technology.
To add functionality to your application
- Drag a
Button
from the Toolbox and drib it anywhere onForm1
. - In the Properties window, modify the (Name) property from
button1
tobtnClickMe
. - Also in the Properties window, alter the
Text
property from button1 to Click ME!. - Elevate a
Characterization
from the Toolbox and drib it anywhere onForm1
. - Resize the just added
Label
insideForm1
so it occupies the entire width ofForm1
. - In the Properties window, change the (Proper name) property from
label1
tolblInfo
. - Also in the Backdrop window, empty the contents of the
Text
property. - Make the properties of
Form1
visible in the Properties window by clicking anywhere onForm1
. - Set the
MinimizeBox
property to False to allow you to finish the application by clicking the OK push that volition at present exist displayed in the upper right corner ofForm1
. - Double click on the Click ME!
Button
to add aClick
event handler to the button. - On the location where the cursor is now located inside the source code editor, add together the post-obit code:
lblInfo.Text = " Button '" + btnClickMe.Text + " ' clicked at " + DateTime.Now.ToLongTimeString();
Annotation: You will meet syntax coloring inside the lawmaking editor, and Intellisense will assist you in inbound this statement.
To build and deploy your application
- From the Build menu, select Build Solution. Assuming y'all didn't make any errors, you will see the following message in the status bar of Visual Studio 2008: Build succeeded.
- Make certain that the Windows Mobile 6 Classic Emulator is selected in the Target Device dropdown box.
- From the Debug menu, select Start Debugging.
After some fourth dimension, you volition encounter the Windows Mobile six Classic Emulator starting. If necessary, .NET Compact Framework 3.five volition exist deployed first to the emulator. Finally, your application will be deployed to the device, where it is automatically started.
Effigy three - Your first awarding running in the Device Emulator
To test your application
- Inside your application that is running in the Device Emulator, click the Click ME! push button, and you should meet some text actualization in the label y'all accept created on your form.
- Echo clicking the button several times, and you should meet the time inside your label existence updated.
- Click on OK in the upper right hand side of your application to end it.
- Shut downwards the emulator by selecting File on its menu, followed by Salve State and Leave.
- Close down Visual Studio 2008.
Related articles in this series
- Windows Mobile App Development Part 2: Device Emulator and Device Emulator Manager
Use Device Emulator and Cellular Emulator to test your applications.
- Windows Mobile App Development Function three: Basic WinForms App Evolution for Windows Mobile Devices
Acquire the basics of developing Windows Forms based applications for Windows Mobile devices.
- Windows Mobile App Development Office iv: Calculation Custom Controls and Making Apply of GPS Hardware
Learn to add custom controls and brand use of GPS hardware in your applications.
- Windows Mobile App Evolution Part five: Intro to using SQL Server CE
Learn to admission information through
DataSet
s andSQLCeResultSet
s in your Mobile apps. - Windows Mobile App Development Part 6: Device Security and Application Deployment
Gain an understanding of device security, testing, and installation of your application on a Windows Mobile device.
- Windows Mobile App Development Part seven: Mobile Web Evolution
Learn to create web based apps for Mobile devices with AJAX support enabled using browser controls.
Boosted resources and references
- Windows Mobile Programmer Center
- Introduction to development with Microsoft Windows Mobile 6
- Development Tools and Resource for Windows Mobile 6
- Code Samples for Windows Mobile
- How do I Build a .NET Compact Framework iii.5 Awarding for Windows Mobile 6 Devices
- Introduction to Windows Mobile Device Development
- What's new for Developers in Windows Mobile 6
Please visit www.myrampup.com for more information.
Source: https://www.codeproject.com/Articles/43357/Windows-Mobile-App-Development-Part-1-Creating-you
Posted by: besterappause1966.blogspot.com
0 Response to "How To Make Windows Mobile App"
Post a Comment