Port Windows CE app to Windows Mobile

I have a rather complex application that was originally built for Windows CE (using Visual Studio 2008, C# 2.0). I'm now trying to get it to run on a Windows Mobile device. There are a few UI quirks, however. I notice that the background color is all white and there doesn't appear to be any borders around a lot of the controls like there is on WinCE. However, my biggest issue is that my application seems to take up the full screen so I can't see the top task bar with the start menu and the click (and presumably the close button for my app?). I also can't see the bottom bar (taskbar?) that normally has the icon to show/hide the keypad.

My form is set to maximized on CE so it should take most of the screen space but not the taskbar(s). I've noticed that Visual Studio prompts for the target platform (either Windows CE or Windows Mobile) when creating a new smart device project. I really hope that I don't have to recompile my application to work properly on Windows Mobile.

-------------Problems Reply------------

On Windows Mobile setting your form's WindowsState property to FormWindowState.Maximized will cause the form to become fullscreen covering the nav bar at the top etc.

I have done a lot of Windows Mobile <--> Windows CE porting and in general if I need to resolve differences like this I end up setting the applicable properties at runtime after I've performed a platform detection check.

Using .NET CF 3.5 you could end up with something like the following:

using Microsoft.WindowsCE.Forms;

if (SystemSettings.Platform == WinCEPlatform.WinCEGeneric)
this.WindowState = FormWindowState.Maximized;
else
this.WindowState = FormWindowState.Normal; // Pocket PC or Smartphone

Luckily there are not too many cases where such differences pop up.

With respect to Visual Studio prompting you to select the target platform, for the most part (atleast for.NET CF based projects) this simply changes the list of emulators and controls from the form designer toolbox that you are able to select.

In most cases you should be able to build your application against one platform and run the resultant executable on another.

One handy use of this feature is the fact that it will provide you with warnings if you attempt to use something not supported by a particular platform. For example selecting a smartphone platform will issue warnings if you attempt to use System.Windows.Forms.Button controls, since these are not supported on smartphone (non touch screen) devices.

As you have found out by now, Windows Mobile apps have a little less screen estate than Windows CE. You will have a top and bottom bar and sometimes an additional bottom bar for tray icons.

To get around this problem you should do a platform check and then make your form smaller if it's windows mobile. If you can't do that without making changes to the form (like in most of my cases) you can try to utilise the soft keys and get rid of any buttons, checkboxes etc. The soft keys can act as buttons or they can be menus and even menus inside menus if you want.

Don't worry much about the target platform if you already have a working app in Windows CE. You don't have to switch to Windows Mobile, although you will get access to the emulators and the supported controls in the toolbox as have been pointed out already.

Category:.net Views:0 Time:2010-01-26

Related post

  • Will the lack of good Windows 8 apps kill Windows tablets? 2014-03-06

    New research shows that Windows 8 has barely half of the most popular iOS apps, and that's one more reason that Windows 8 tablets simply haven't caught on. Apps sell tablets, and unless Microsoft closes the app gap, Windows tablets may never make it.

  • i need to install ActiveX in order to access a client's webpage. Where do I go to find a genuine windows ActiveX app for Windows 8? 2012-04-26

    i need to install ActiveX in order to access a client's webpage. Where do I go to find a genuine windows ActiveX app for Windows 8? --------------Solutions------------- Active X Controls are not apps......... they are add-on programs that facilitate

  • I want to see a Wish list added to the Windows Store App on windows 8 2012-09-22

    I want to see a Wish list added to the Windows Store App on windows 8 so I can plan better what apps, games, and tools that I want to buy later or download, it would be a great time saver, and also help people on low budgets when they can buy a app -

  • How do I download a Windows 8 app on Windows 7 so I can install it on a Windows 8 machine later? 2012-10-30

    How do I download a Windows 8 app on Windows 7 so I can install it on a Windows 8 machine later? --------------Solutions------------- How do I get to the download? When I go to the Windows store for an app, it just tells me I need to get Windows 8. F

  • can't install windows phone app on windows 7 2014-04-14

    can't install windows phone app on windows 7 --------------Solutions------------- Hi xinli0925. Thank you for posting on the forum. Have you tried the steps provided in this article: http://support.microsoft.com/kb/2749484?wa=wsignin1.0 Let us know i

  • Is it possible to build Windows 8 app using Windows 7 and Visual Studio 2012? 2014-05-26

    Is it possible to build Windows 8 app using Windows 7 and Visual Studio 2012? The app asks test questions. Two users answer by tapping on the screen, and they want to do it faster. I need to check who answered faster. I am not sure, maybe I should us

  • Windows Phone App on Windows 8.1 Crashes Before Start 2014-06-11

    Windows Phone app crashes after reinstalled Windows 8.1. The previous instalation was Windows 8 updated to 8.1 but i had to reinstall and now half of my apps are not working even though i reinstalled them several times (just to be sure). *Update* I j

  • Windows Phone App for Windows 8.1 2014-12-26

    I'm having a problem with the Windows Phone app for Windows 8.1 (Modern). When I plug my phone into my PC it launches the Windows Phone app correctly however the app does not recognize my phone or display its information to allow for transfer of file

  • Is it possible to port an iOS app to Windows using GNUstep? (for learning purposes) 2011-01-15

    I am an Objective-C newbie, who still does not have a Mac, but still I want to practice the language. I heard that in the non-Mac world, GNUstep offers a good alternative to Cocoa, and can be used as a lerning tool for new objective-c developers. My

  • Windows 8 app support jQuery mobile? 2013-10-16

    I am new to windows 8 app development. I am developing cross platform app for laptops or tablets. My app work fine on iOS and Android with jQuery-mobile but for windows 8 app it is not working. So my question is Windows 8/8.1 app doesn't/does support

  • Error message when installing the Windows Phone App for Windows 7 PC 2012-02-11

    I am trying to sync my music from my PC to my Windows Phone 8 and I am directed to install the new windows phone app for my PC. When I click on the link to download the app I get the following error: Windows Phone Requires .Net framework 4.0 Please i

  • Windows store app freezes Windows 8.1 2012-03-06

    I can open the Window store app but then it just freezes and nothing happens, Has anyone know the answer OT: WINDOWS STORE APP --------------Solutions------------- Hi, After searching on google found in regard to Windows store to download -KB2919442

  • Can't open windows phone app on windows 7 2012-04-26

    I installed windows phone app on my windows 7 and I have a lumia 920. When I try to open Windows Phone app, the error message says: Windows cannot find 'C:\Program'. Make sure you typed the name correctly, and then try again. Please help ------------

  • Windows phone apps and windows app store 2012-05-21

    I have a windows 8 phone with many apps downloaded to it. I have a windows 8.1 tablet. I want t to know if , while signed in with same account on both, will I be able to install my purchased apps on both? I can only see on my tablet a few of the wind

  • Windows Phone App on Windows 8 2012-09-13

    Received and installed an updated Phone App on Windows 8 this morning and now all I get is a black screen when I connect my phone. My phone is still charging and appears to be still transferring information to my computer. Just the black screen a pro

  • Can no longer open Windows Store app in Windows 8 or 8.1 Microsft should develop an automatic fix for this problem 2012-09-15

    I can no longer open the Windows Store app. From reviewing the web and the Microsoft community forum, I see that this is a common problem for many users. Why can't Microsoft develop an automatic fix for this problem or allow the user to uninstall and

  • Purchased Windows 8 Apps in Windows Phone? 2013-03-02

    Hi, I just purchased a new Windows Phone, and I love it. However, I am wondering: Is it possible that purchased Windows 8 apps can be transferred to a Windows Phone with the same Microsoft account (e.g. Cocktail Flow on Windows 8 can be also installe

  • Windows Phone app for Windows 8 not working 2013-04-10

    Hello! Here is what I can see when I try to sync my Nokia Lumia 925 or 920. It won't show images/videos/musics thumbs and I'm not able to add anything... Fortunally images and videos auto-import phone-to-PC is working. I've also tried to uninstall an

  • Change language for Windows Calendar app on Windows 8. 2013-04-11

    How can I change my Calendar language? Googled and found out the language is Yoruba. Also tried the regional language stuff and asked Windows to copy my settings to the start screen but no changes yet. Running Windows 8 64 bit. Also, tried changing i

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.140 (s). 11 q(s)