C# Tutorials and offshore development in India
    Tutorials   Resources   Forum   Reviews   Communities   Interview   Jobs   Projects   Training   Your Ad Here    
Silverlight Games | Mentor | Code Converter | Articles | Code Factory | Computer Jokes | Members | Peer Appraisal | IT Companies | Bookmarks | Polls | Revenue Sharing | Lobby | Gift Shop |


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...






Resources » Articles » .NET Framework »

Introduction to .NET Compact Framework


Posted Date: 10 Jun 2004    Resource Type: Articles    Category: .NET Framework
Author: sibish n bMember Level: Bronze    
Rating: 1 out of 5Points: 5



Introduction

.NET Compact Framework is a new computing platform from Microsoft for Mobile devices like Pocket PC. .Net Compact Framework is a proper subset of .Net Full Framework ie all programs coded in .Net Compact Framework works in Full framework.

.NET Compact Frameowrk supports Networking(sockets),Database Access(Sql CE), Graphics (GDI) ,Threadsand also allow you to call the native DLLs through DLL wrappers using P/Invoke. We cannot add the Com and Activex as in .Net Full Framework ie even to add a Date Time Picker Component we will have to call it through DLL wrappers.
.Net Compact Framework provides the same environment as Full Framework which helps the Desktop developers to code easily for Mobile Devices. We can code in C# or
VB.Net..Net Compact Framework is shipped with Visual Studio 2003. Also there is a builtin emulator for testing the apps coded in .Net Compact Framework. Emulator runs Windows Mobile 2002 Operating System. We can call the Windows CE(Comapct Edition) API calls from .Net Compact Framework. Instead of “kernal32.dll” in win32,
we need to use “core.dll” in Windows CE. We can call API functions vusing P/Invoke.

To begin with, take new project from the file menu of Visual Studio and select “Smart Device Application”. You’ll be asked the target, select “Pocket PC “and project type “Windows Application”. If you have a Pocket PC device, connect the device to the USB Port and set the target as Pocket Device. So when u run the app, it will be downloaded to the Device and will get executed. Now you will get a form as you get in Full Framwork Windows Application. There are a number of Device Controls like buttons, tab page, imers etc which can be dragged and dropped. Now when you press ctrl F5, the app runs in the Pocket PC Emulator.

To configure the emulator, go to Tools->Options->Device Tools->devices->Pocket Pc Emulator->configure. Here you can adjust the display, ram, serial/parallel ports. For port communication, it’s better to use the actual device because emulators usually don’t work. I tried serial port communication but the emulator hangs. Also you need minimum 256 MB Ram for the emulator to work well.The device controls have limited option like Device Button Properties has limited options like it has a fixed style etc. We can access files and images in .Net Compact Framework by adding the files and images in the project. So when the App is deployed, these files will be downloaded in to the emulator or device. Another way to copy into the emulator is by sharing the files.We can access the shared files in the system from the emulator just like accessing a files from a remote system. We can see the shared folders. The detail of accessing the shared resources is explained in my next article about “Windows Mobile Operating System”.

Device Controls

  • Button
  • MainMenu
  • NumericUpDown
  • ComboBox
  • Panel
  • ContextMenu
  • PictureBox
  • DataGrid*
  • ProgressBar
  • DomainUpDown
  • RadioButton
  • FileOpenDialog
  • StatusBar
  • HScrollBar
  • TabControl
  • ImageList
  • TextBox
  • Label
  • Timer
  • ToolBar
  • TreeView
  • VScrollBar
  • ListBox
  • ListView
  • FileSaveDialog
  • CheckBox

    Unsupported Controls

  • GroupBox
  • RichTextBox
  • Notification Bubble
  • Print Controls

    Unsupported Control (Not available in Windows CE)

  • CheckedListBox
  • ColorDialog
  • ErrorProvider
  • HelpProvider
  • LinkLabel
  • NotifyIcon
  • ToolTip
  • Splitter
  • FontDialog

    Emulators can save their state. So after the first deployment of application, if the state is saved, the .Net Compact Framework components will not be downloaded again.

    Summary

    If you want to create applications for your mobile devices, .NET Compact Framework is the best one available.




  • Responses

    Author: Brainstorming Guy    19 Nov 2004Member Level: Diamond   Points : 0
    Hai,
    Nice article about the Smart Device Applications. It gave us a bried introduction about .NET Compact Framework.
    Note for Developers :
    One more thing, since the Compact Framework doesn't have as flexible as Windows Application, please hold on developing Smart Device Applications. Major enhancements are under developement, and in the next version of .NET u can expect a lot.

    Regards,
    Brainstorming Guys


    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    (No tags found.)

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Thread Communication Using Wait(), Pulse() and PulseAll()
    Previous Resource: Introduction to reflection in C#
    Return to Discussion Resource Index
    Post New Resource
    Category: .NET Framework


    Post resources and earn money!
     
    Related Resources



    dotNet Slackers

    About Us    Contact Us    Privacy Policy    Terms Of Use