Getting started with widgets on Windows Mobile 6.5

Now that the Windows Mobile 6.5 Developer Toolkit is out, it is time to start writing widgets!!!

Necessary equipment:

1)      The Windows Mobile 6.5 emulator images

2)      The web development environment of choice

3)      WMDC or Windows Mobile Device Center (on Vista or Windows 7) or ActiveSync 4.5

With that you should be ready to go to get started, the first step is to start the emulator and cradle the device. The emulators can be started from the start menu under the “Windows Mobile 6 SDK -> Stand Alone Emulator Images -> <Language>”.  The device emulator manager can be started using explorer to navigate to the following folder “C:\Program Files\Microsoft Device Emulator\1.0” and selecting dvcemumanager.exe.

Once they are both started, open WMDC or ActiveSync and select connection options and, on the “Connect one of the following” combo box select “DMA” and click “OK”.

Now, on the “Device Emulator Manager” select “Refresh” and then find the emulator on the list, should be the GUID under others and right click -> cradle to connect it to the PC.

UPDATE: Thanks to Peter Nowaks for pointing this out, The emulator can be listed under the "Windows Mobile 6 Professional SDK" category, depending if you have the Windows Mobile 6 SDK installed or not… Just look for the "play" icon :).

Once that is done, select “Connect without setting up my device” and you should be ready to go, to test, open internet explorer on the 6.5 emulator and navigate to any site, if all is set up correctly it will navigate to it using our brand new browser.

And now…. the fun part begins!

To write a widget we need to follow three easy steps.

1)      Develop your widget code

For this you can use the web development tool of your choice, but as an example we can start with something super simple, as follows (copy it into a widget.htm document)



    <title>Cool Widget!</title>



I’m a cool windows mobile 6.5 widget




2)      Package your widget

Now we have our extremely functional widget code, now we need to create a manifest file (so the framework knows what to do with it) following the w3C widget standard for packaging and configuration (On 6.5 we support the December 22 2008 draft), but to make things easy, here is a small manifest, copy it into a config.xml file in the same folder as your widget.htm

<?xml version="1.0" encoding="utf-8" ?>

<widget version="1.0"



  <name>My first widget</name>

  <content src="widget.htm" type="text/html" />

  <access network="true" />

  <icon src="icon.png"/>

  <description>This is my first widget,

               it won’t make a lot of money on the

               marketplace but at least is cute!</description>


Don’t forget to also add an icon called icon.png on the same folder. 

At this point, you should have three files (config.xml, icon.png and widget.htm), now we need to package them, on explorer, select the files, right click and send to a compressed folder (it is important to select the files and not the folder that contains them because we want config.xml  to be in the root of the zip container).  Now just rename the newly created zip file to “widget.wgt” and you are done with this step.

3)      Deploy and run

On “Computer” you should see the cradled device emulator as “PocketPC device”


Use it to navigate to “My Documents” on the device and copy the widget file created in step 2 there.  Now, on the emulator, open file explorer using the start menu and, listed there you should see your widget file, click on it. 

This should start the installation process, once that is done you will see your very first widget on screen!!!

To continue playing with this widget (make it better, etc) you can find the uncompressed files on the “Program Files\Widgets\User\<WidgetID> folder" on the device. 

The widget ID is generated at install time and it is an always increasing integer (therefore, the most recently installed widget will have the greatest number).  You can replace, add, remove files here for testing at will; the only thing you need for a your widget to pick the changes up is to exit it and start it again, it will have an entry on the start menu.

I will be sharing more information about the widget API, how to extend the widget framework capabilities, debugging tips, best practices, etc in future posts but I wanted to help everyone to get started.

For now, you can also take a quick look at my  TechDays session where I describe the API set and some of the capabilities of the framework.   To access it you’ll need to log into the Microsoft Tech Days site and search for MBL302 Windows Mobile Web and Widgets: Leveraging web technologies to build experiences for Windows Mobile.

Stay tuned, have fun and don’t forget to share your thoughts… Also, before I forget, you can upload your cool widget creations to the Marketplace :), visit for more information.

UPDATE: The MSDN docs are online

Jorge Peraza

Comments (38)

  1. redsolo says:


    If Im going to create an application for WM6.5 and add it to the program’s start menu. How large images should I have in the icon for the application so it looks nice? I currently have 64×64 as max size in the icon and it looks pixelized.

    So what icon sizes should I include in my app?

  2. JORGEBA says:

    Depends on the device, the recomended sizes are (This is comming from the marketplace guideliness).







  3. Thank you, this was nice and easy!

    Is there a reason why Widget Icons are not showing up on WM 6.5 Standard?

    I have the screen shots of that in my review of WM 6.5 Standard, here:

  4. JORGEBA says:

    Yes, unfortunatelly the standard start menu only supports ICO files (not PNGs or JPGs like the PPC one)… to make things a little bit more commical, because of a bug that could not be fixed on time, PPC does not support ICOs for widgets… Even though this is kinnda weird there is a solution that makes it all work… just include both!

    on the manifest file, just add

    <icon src="icon.png/><icon src="icon.ico"/> (the png should be listed first)

  5. JORGEBA says:

    The search widget .ico file is malformed on the emulator image (it has pngs inside rather than bmps), just try it with some other icon and it should be fine

  6. JORGEBA says:

    About the installer issue (where you can install the same widget two times) make sure you give your widget a unique id (it has to be a well formed URI) ex

    <widget version="1.0"



    THis is important since we use that field to see if the widget is already installed or not and to check the version number in case the widget is to be updated

  7. Jim Burton says:

    Please tell me that Widgets can be installed onto the device’s storage card 🙂

  8. JORGEBA says:

    For the moment widgets can only be installed on main memory

  9. Hayes Haugen says:

    Just moved our X1 panel sources into a the widget structure.   Our implementation navigates to urls that are on our main website.  On the X1 that was not a problem since the container was really the browser.  However in the widget world once the user taps an external url they leave the widget container and go into Pocket IE.

    Is there anyway to navigate to web urls without leaving the widget container?

    I just started playing with this stuff so perhaps I missed something.

  10. JORGEBA says:

    Officially can’t navigate inplace to any URL inside a widget… that said, I’m pretty sure you can  by using an iframe to load web content to. use it with care though because ee did not test this scenario.  Also, navigation on smartfons will probably be broken because there is no visible cursor  on widgets.

  11. Guest says:

    Hi..Im amazed of d people bhind computers..Pls help me about my n6600 phone..I forgot my locked code for my phone’s mmc.. I cnt open it..How cn i open my mmc?Pls help

  12. Rafay says:

    information regarding widgets on windows mobile is really very helpful for people like me, good post, keep doing it more.



  13. Samir says:

    Few more information that I wanted to know abt Widget Capabilities.

    1. Access to GPS device of the phone, so that Location aware application can be developed.

    2. Access to multmedia codecs of device. For capture and playback of multimedia content.

    3. Access to messaging features of the device so that Messaging application can be developed which can handle particular type of sms.

    4. Access to file system.

    Comments are highly appreciated.

  14. Jan Slodicka says:

    I’ve got stuck on a funny problem: WM 6 SDK supposes it is installed on the C: drive. More precisely it can be installed elsewhere, but can’t be used unless it is on the C: drive. Solutions such as using subst etc do not work. What can I do if I do not want to reinstall my PC?

  15. NEEL MANI says:

    I want to know that if i want to code something in C, how can i link it to my  widget. Somehow i m more comfortable with c/c++ than Java Script

  16. JORGEBA says:

    Hi Samir, Neel

    Please take a look at Nick’s great post at  it shows how to extend the widget object model to access C/C++ written code and enable things that are not possible out of the box (like GPS access)

  17. Thank you for such a great post

    I would share this

  18. guojing says:


    I just copy your code in the folder and zipped them into a wgt file.but when i run the zip file in the WM 6.5 Image.It told me is not Compatible with this device..

    Can you tell me why? it’s really strange.

  19. JORGEBA says:

    I haver seen that happen when you zip the folder rather than just the file. please open your zip file and make sure all the files are in the root/

  20. guojing says:

    thanks i solve that problem.

    but i think it’s not support for Chinese Zh-cn right? because if i change the description to chinese, it can not install.

    Thanks so much.

  21. guojing says:

    ASPX is not supported right now.. if ASPX is supported in the mobile device as a widget, i think it will be more powerful.

    It here just supported static page right now? only html and javascript?

  22. JORGEBA says:

    guojing – would it be possible for you to share your confix.xml that does not work?

    About ASPX, it is a server side technology so widgets will not support it directly, however, you can consume data from WebServices written in ASP.NET using AJAX if you want (check out Nick’s cool post at

    Widgets do support AJAX and DHTML so they can be very interactive, also, if you would like to take it to the next level, we also support flash 🙂

  23. Dietmar says:

    Hi, I’m not too sure if anybody has asked this yet, but what about windows mobile 6.1… I just bought the htc touch hd( and in my opinion is an iphone competitor) which uses this ops. and lo and behold i find this blog for a windows mobile version higher than what i thought was the latest ops system for Microsoft phones.

    So here’s my question will the widgets work on my phone or will Microsoft release an update to allow widgets.

  24. guojing says:


    I solve that problem but it seems config can not support Chinese,but im not sure for that.because i’m always write the code in English :),so just forget it.

    And i saw that blog yesterday and you can see i’m writing some alticles on Chineses on How to build WM application with widget.but i think it’s a little bit compliate read data with ajax 4 and data ent because most of us are using standard javascript or JQuery or other js lib build web application.

    BTW,how can i get more document about the template of blind data?i read that blog and i know it’s read from server and it’s a template.but i’m really can not understand why should i write like that.

    thanks so much,sorry for my poor english.

  25. Nick says:

    is there a way to connect the Emulator to the internet so that I can test it with connecting it to and Exchange server?

  26. vaughn says:

    It looks like Widget doesn’t support Regular Expression

    if i write code like

    var reg = new RegExp("<"+ele+">.*</"+ele+">","g");

    It won’t works…

  27. tomz says:

    it looks like no way to connect to data except using ajax 4 and wcf,make a easy widget complicate..

    and also XMLDom is not support in the widget engine. how could i parse the XML file?

  28. JORGEBA says:

    vaugnh – I used the method described in for regular expressions and that seems to work, hope that helps.

    tomz – Widgets support XMLHttpRequest wich allows you to connect pretty much to anything, Also, you can use DOMDocument to parse XML (

    Nick – You can connect an emulator to your internet connection using ActiveSync following the instructions on my post to cradle the device (this will share the host internet connection) or, if you are connected to an internet router or corporate network then you can give the emulator a network connection by  going to the emulator properties menu (File->Configure…) and the selecting the "Network" tab, in there you should select the first checkbox and select ok.  Note that you need VirtualPC 2007 installed for this to work.

  29. Stephan says:

    Can someone can post a link to a widget project file?!

    that would help m ea lot to start!


  30. Hi JorgeBa

    I tried to connect the emulator to internet but nothing happens.

    I setup to allow DMA, I cradle it,  I check it to use the PC network connection and in the emulator looks like connected (I can see the network icon) but when I try to browse I cannot navigate.

    I have installed VPC but I don’t understand why do I need  it?. Is there any documentation about the gadget framework? I read this article and I learned but it’s just an introduction, I wanna start developing a PRO widget.

    A question: ¿how can I acces to local File System with the Widget FW ? – I need to execute a local .EXE that writes a file and then read that file.

    Thank u.

    Javier Andrés Cáceres Alvis

    Blog Personal:

    Blog Intel:

  31. eDGARDO PANCHANA says:

    Hi! my name is edgardo panchana, i have a problem, when i try to install the widget in my device this show me a message telling me that this is not compatible? can anybody help me? i have the windows mobile 6.5 OS in spanish. Thanks!

  32. Jogos Gratis says:

    I’m having a lot of problems to install this software in my mobile…

  33. JORGEBA says:

    javierc –

    I think that your network problems are because you have a proxy server so the emulator needs to be set up to use it  (start->settings->connections->connections->Edit my proxy server), hope that helps :).

    The MSDN Documentation for widgets is here:

    As for your last question, There is no way to have a widget start an exe on the device, nor for it to write a file (or read) as its configured out of the box, you could extend the Widget API to do this however (please take a look at

    eDGARDO and Jogos – The Widget Installer is disabled by default on all retail builds so it needs to be enabled by hand, this is easy though, using a registry editor please just add the following key:


      @="wmwidgetinstaller.exe %1"

  34. Enzo says:


    How can I read the address list of the phone? Is widget not able read the content in file system?

    Thank You~

  35. MobileSpoon says:

    FuzeMobility just created an amazing list of 50 widgets!

    more details in here:

  36. TinTin says:

    Great post,  thank you!

    I’m wondering about installation though – you say the widgets installer is disabled by default – that seems odd!

    So how can I deploy a widget (as CAB? maybe) wich will a) enable the widget installer and b) start the install of the widget without the user having to go through all these steps?