My 2nd .NET App on Windows Mobile

After playing around in Visual Studio, and taking my first foray into the VB.NET world, I thought it might be kind of interesting to try and see just how portable .NET code really is. So I decided to port the little Math Game to my Windows Mobile 6 phone.

Guess what! I did it, and it wasn't actually all that difficult to do.

The conversion of the code was pretty simple. I just exported the userform from my original Windows project and imported it into a new Windows Mobile 6 application. (Err... after I downloaded the Windows 6 SDK which doesn't ship with VS2008 Pro.)

It worked just fine in the Emulator, so I then set about the deployment process.

It took way longer to get the deployment done than to write the project, I'll tell you that right now. You can't install an exe file on Windows Mobile 6, but rather have to package it up in a cab file. Great, but how do you do that?

After some searching, I finally found http://msdn.microsoft.com/en-us/library/zcebx8f8.aspx, which takes you right through the process. Fortunately I do have a digital signature at work, so I was able to use that to sign the code as well. I'm not sure if the certificate would be trusted on anyone else's device or not, but it did work on mine.

So once I deployed the cab file to my phone, the install was easy, and the app works. It just goes to show you just how portable simple .NET code can be, which is really cool.

Despite all the goodness here, there are a couple of quirks that I ran into…

  • In the emulator, I can get my shortcut to show up in the Games folder off the start menu. For some reason I can't get that shortcut to show on the actual device though. Instead I have to dig down through the File ExploreràProgram FilesàGames. Oh… wait… I think I got it. I was setting up a shortcut in the Games folder, but it looks like it needs to be in the "Games Files" folder.
  • My icon file only shows up when the shortcut is selected. When it's not selected it looks like a DOS box.
  • I can't figure out how to turn on the NumLock when the game starts. (I'm sure it's easy when you know what you're doing.) This means that you have to hold down the FN key in order to get a number into the box.
  • On my phone it also enters the numbers in a pop-up box, which you have to confirm, before you can press enter. (Nevermind… that's the XT9 Predictive Text feature.)
  • I wish I could stop the incessant beeping when you click enter and the messagebox pops up, but don't know how to do that.

At any rate, on the whole it works, and that's the good thing.

I have no idea if this works on Windows 6.1 or Windows 6.5, but it seems to work on Windows 6.0 for me. I'd be really curious to know if it installs for anyone else. If you'd like to give it a try, you can get it here.

3 thoughts on “My 2nd .NET App on Windows Mobile

  1. Hi Ken,

    You truly are a mad man... 😀

    Very impressed, and I'm not surprised that you got this to work. I'm just worried about what you might try next! :S

    Great stuff, keep it coming!

    Mike

  2. Well, as for next, I need to get back to trying it with Excel. These were both "something shiny" diversions that took me off track.

    You know, I should change my blog's name to that... "Oooh... something shiny!"

  3. > You know, I should change my blog’s name to that… “Oooh… something shiny!”

    Lol, you should! Go for it...

If you have a comment or question about the blog post content, please feel free to post it here. If you need help adapting this solution to your own needs, please post in our free help forum.

Your email address will not be published. Required fields are marked *