Announcing the ChrisTec Managed Today Screen Framework

I have had a lot of positive feedback about the early preview of my project to allow custom Windows Mobile Today Screen Items to be written in C# or VB.NET. In the past few days I have been working on formalising this project and putting some plans in place to further develop the concept.

Today I would like to announce that I have hosted the project on the CodePlex website. The framework is now available at http://www.codeplex.com/ManagedTodayScreen.

The CodePlex webpage for this project shows two additional releases (Alpha 1 and Alpha 2) since the proof of concept I demonstrated in my previous blog entry. One advantage of these new releases is that after bouncing some ideas around with Peter Nowak I have managed to significantly simplify the installation process for custom items.

To help promote this framework I have also put together the following screencast to help demonstrate how you can utilise the latest release to create your own custom today screen items in C# or VB.NET.

I would love your feedback on this screencast. Watching it myself it is clear that I need to improve my technique, but hopefully this will come with practice. It defiantly seems easier to demonstrate some things in video form rather than via words.

22 Responses to “Announcing the ChrisTec Managed Today Screen Framework”

  1. Le Sage says:

    Great screencast, it’s a good idea to describe from the very beginning to the very end how to do it. Perfect speed, not too fast, not too slow.
    I hope I have time to try your framework soon.

  2. Wally says:

    Looks great. I’ll take a look and play with it a bit. I can see that this might be very useful.

  3. Leong says:

    Very good screencast, just try out the framework and it works great, but when try to rebuild from the Alpha2 source I got two errors, any idea what was wrong?

    error:

    Error 1 error LNK2019: unresolved external symbol SHInitDialog referenced in function “int __cdecl CustomItemOptionsDlgProc(struct HWND__ *,unsigned int,unsigned int,long)” (?CustomItemOptionsDlgProc@@YAHPAUHWND__@@IIJ@Z) ManagedTodayScreenItem.obj

    Error 2 fatal error LNK1120: 1 unresolved externals Windows Mobile 6 Professional SDK

  4. Hi,

    When building the project try to build it against the Pocket PC 2003 SDK, this will produce a single binary (and CAB file) that will work on Pocket PC 2003, Windows Mobile 5.0 and 6 devices.

    If the project is built against the Windows Mobile 6 Professional SDK the resultant executables will only run on WM6 or newer devices. I’ve never built the project against these newer SDKs, and they are simply there because when I initially created the project I selected all device platforms in the new project wizard.

    Having said that you can fix the compile error you are seeing here. Go into the project settings for the ManagedTodayScreenItem project (i.e. the one with the linker error) and add “aygshell.lib” to the list of additional libraries within the linker section. This is the library that implements the SHInitDialog API. You will see it’s currently there for the Pocket PC 2003 target, but not the WM6 one.

    I will probably tidy up some of these build targets etc in a release I am aiming to make at some stage this week.

    Hope this helps,
    Christopher

  5. Wally says:

    I’m having trouble getting your framework to show up on the WM6 today screen. This is WM6 Standard running on a T-Mobile Dash. I’ve installed the cab file and dropped a sample item dll into the directory, but nothing is showing on my today screen. Any ideas?

  6. Hi Wally,

    Perhaps I should have been clearer (I knew this terminology would trip people up) as the distinctions are not always so obvious.

    Windows Mobile Professional (and Classic) devices have a Today Screen, while Windows Mobile Standard devices have a Home Screen.

    Although both screens serve the same purpose they have quite different APIs and mechanisms with respect to how to customise and extend them.

    At present this project only deals with the Today Screen i.e. Windows Mobile Professional and Classic devices.

    I did wonder about what would be involved to make a framework variant for Windows Mobile Standard (smartphone) users. This isn’t something I have any plans for at this point in time time though.

    Sorry…

  7. Wally says:

    Thanks for the feedback. I’ll have to check to see if WM6Pro is offered on these phones or not.

  8. Masoud says:

    Hi,
    Thanks for the amazing framework and project. It’s really useful feature in building Mobile Applications which .Net Framework really lacks it.

    Oh, one question I should ask.
    How can I compile the ManagedTodayScreenItem project which is in C++ ?
    I have Microsoft Visual C++ installed on my machine, but when I try to compile it (Build), nothing happens.

    Thanks so much.

  9. Masoud says:

    Another problem I found which I could not manage is controls back colors you want to put on your form.
    The back color of Label, Radio Button, CheckBox, … should be transparent, which is not possible.
    When you use those set of controls, you will get an ugly result on your Today Screen.

    I wonder if there is any solution to this problem.

    Thanks.

  10. Hi Masoud,

    Yes this is a problem, even if you are creating your custom today screen item in native code. One possible solution is to utilise controls which have a transparent background. If you search the net you should be able to find a couple of ways to achieve this within the .NET CF environment, some controls are easier than others to work around.

    There are also other problems using the built in controls within today screen items (they have a tendency to steal keyboard focus, making it difficult to scroll through items using the D-PAD for example).

    Most today screen items tend to be fairly “static” in nature. Microsoft’s examples generally override the WM_PAINT message (OnPaint method in .NET) and draw the onscreen contents rather than using built in controls.

    This is definitely an area I would like to investigate/improve upon once the initial infrastructure is in place, perhaps by offering some controls such as TransparentButton, TransparentLabel et al.

    Thanks for the comments,
    Christopher

  11. Rushikesh Patil says:

    Hi Chris,

    First i would like to thank you and appreciate you for your efforts !!!

    I have been trying to utilize your framework for Custom Today screen. I have to implement this utility for my project. I did exactly the same process u have mentioned in ur early preview(http://www.christec.co.nz/blog/archives/279). I did write the registry values as mentioned by you. But when i install the sample application i get null reference exception in TodayScreenPluginForm.OnLoad() method when it reads from the NativeHandle value in registry.

    As i looked into the code i could understand that NativeHandle value is of native window handle. InitializeCustomItem() function of ManagedTodayScreenItem.cpp file is writing that value in the registry. Am I right? I am not very familiar with native coding. I tried displaying messagebox to InitializeCustomItem() but it didnt show up. So i am not sure whether this functions has been called or not.

    Again i tried with Alpha 2 release of your framework but still there is a same problem.

    I am waiting for your reply.

    Thanks & Regards,
    Rushikesh Patil

  12. Rushikesh Patil says:

    I am using O2 device. Is there any device specific problem writing to the registry?

    Thanks,
    Rushikesh

  13. Wiliam says:

    Congratulations for your work first.

    Second, the alpha 2 version crashes PPC 2003 (emulator and my PDA), after installation if you do a soft reset the screen remains white.

    Wiliam.

  14. Craig says:

    Hey Chris,

    Thanks for this project, it was just what I need as a VB programmer! One question, I have been trying to figure out how to really use this with my VB project (I want to write a Today screen plug in VB) but your video above is about SQL Compact and not the today.dll. Is there another link to the video or did I read this blog wrong?

    Thanks!

  15. Yeriel says:

    Managed Items do not appear in the TodayScreen applet on WM6.1 Pro, .NETCF 3.5

    Hi Chris,

    Thanks a lot for your efforts. Your idea is great!

    Anyhow, so far I have some touble by testing your project.
    I have installed the “ChrisTech.WindowsMobile.TodayScreen-Framework.CAB” (Alpha2) on my Windows Mobile 6.1 Pro, .NET Compact Framework 3.5.

    Then I have installed the SampleTodayScreenItems.CAB (Alpha2).

    After installing both files successfully I can see in the registry

    HKLM\\Software\Microsoft\Today\Items\Managed Items

    “DLL”=”\StorageCard\Program Files\Managed Today Screen Framework\ManagedTodayScreenItem.dll”

    “Enabled”=dword:0×000001

    “Options”=dword:00000000

    “Selectability”=dword:0×000002

    “Type”=dword:0×000004

    I have tried both soft resetting, and powering off and on the device. However, the Managed Items do not appear in the Item tap of the TodayScreen applet neither a TodayScreenItem becomes visible on the Today Screen even the DWord “Enabled” is set to 1 in the registry.

    Can you give me a hint how to solve this or where to look further?

    Many thanks for your suggestion.

  16. Stephen says:

    Can I get a vb.net sample, can’t load the smaple in vs2k8 without errors on the form resources. I would really love a vb.net sample with vs2k8, thanks

  17. Archana Muralidhar says:

    Hi Chris

    I know its been very long time, and is one of the most stupidest question to ask, but here it goes, i have created the plug-in, but how do i create a cab file for this, please help me out

  18. Archana says:

    Hi Chris

    I know its been very long time, and is one of the most stupidest question to ask, but here it goes, i have created the plug-in, but how do i create a cab file for this, please help me out, i am stuck from here

  19. adrienne says:

    This is great! I appreciate the work you did to provide this– it’s perfect to help me get something up and running quickly to prototype. One question– is it possible for the C# ScreenItem to display status as read from a file? Or do you have any other suggestions? The sample I created doesn’t seem to be reading the file, but I’m not entirely sure why. Thanks!

  20. Sanny says:

    Hello Chris,

    This is a wonderful work by you. This has made creating a today screen item very easy. I’m just facing a problem – installing today screen item disables the soft key in the today screen. I’ve run your samples on WM 6.0 Emulator and they also have the same problem. How to get over it?

  21. radenko says:

    Can you fix screencast because on this post it’s wrong and original one on BLIP.TV is not completed?

  22. Bernardo says:

    Hi,
    congratulations on the framework. Very useful!

    Could you please provide a version for Windows Mobile 6 SDK?

    I am trying to use a library which only works on Windows Mobile 6 SDK with C# 3.5.

    Best regards.

Leave a Reply