Results 1 to 11 of 11

Thread: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    I made a basic application for XP in VB 2005. All it does is randomly flash the numbers 2 through 9, as well as A, J, Q, K. (cards in one suit of playing cards). It leaves one of the cards out, and the trick is to try and pick out the missing card quickly.

    Anyway, it's a silly little game that I want to be able to take on the go, so I thought I would try and port it to Windows CE 5. I thought it should be easy. I started a Windows CE 5 project in VB 2005, and moved most of the code to it (and redesigned the form to fit on screen)

    I can build and deploy without any errors... but, when I try to run the EXE that gets deployed to my device, I get a nasty error:

    "Cannot find 'DeviceApplication1' (or one of its components). Make sure the path...."

    No idea what's going on - and I've really tried everything before jumping on here for help.

    My only clue, is that the same exe (found in the project's "bin" folder) actually runs fine in XP. I wouldn't have thought it should, since it should be compiled for CE 5, right?

    At any rate, if anyone would like to take a look, here are both the XP and CE 5 versions:
    http://www.rohanhill.com/Cards-CE5.zip (10kb)
    http://www.rohanhill.com/Cards-XP.zip (13kb)
    Attached Files Attached Files

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Hi,
    are you using any Pinvokes?
    If so, you would need to change them for the CE platform.

    I tried the code on a PPC emulator, and even though the screen doesn't fit, it runs. I suspect something missing on the device.

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    I can't say I know what Pinvokes are - so I think probably not. Most of the code is pretty basic. If, Loop, For, etc.

    I'm wondering if maybe there are some runtimes that I might need?

    The device itself is Windows CE 5.0, but its a device that isn't meant to give access to the CE desktop (it's a GPS). It's quite possible that they only put a really basic bare-bones installation of Windows on it.

    Are there runtime libraries, etc, that VB 2005 might rely upon?

  4. #4
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Hi,
    if you deploy to the device from the IDE, it should deploy everything you need?
    Try running your app on an emulator - it worked for me.

    What device are you trying to deploy to?

    If it is not a PocketPC, are you sure it is running Windows CE5?

    Pete
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    System properties on the device tell me its a Windows CE version 5.00 machine. Samsung SC3244 ARM chip as far as I know.

    Would you be able to send me the compiled EXE that ran for you? Then I'll know if its my compiling, or my device that's going wrong?

    Cheers

  6. #6

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Oh, this is interesting -

    I tried a CE 5.0 emulator, and my EXE wouldn't run at all (though in this case it didn't give an error either - simply did nothing)

    I starting to get increasingly suspicious that I may be deploying or building improperly. To mention this again - the bin EXE file, that in this case I find in:
    "......\Projects\Cards CE\DeviceApplication1\DeviceApplication1\bin\Release"

    Actually runs, native with no emulator, in Windows XP. Doesn't this indicate that it has simply been built for XP not for CE? If so, why?

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Are you creating a cab file for installation on the portable? I don't know that you can simply take the exe from the bin folder, move it to the portable and run it. I've always created cabs....or actually, I always tested on the portable, so the program was already there, but whenever I wanted to re-install, I used a cab file.
    My usual boring signature: Nothing

  8. #8

    Thread Starter
    New Member
    Join Date
    Mar 2006
    Posts
    8

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Creating cabs is what I was used to when developing in Embedded Visual Basic. I don't seem to be able to find that method in VB 2005.

    In EVB there was a "deploy" wizard, or something to that effect, that created the cab files. In VB 2005, it just seems to have build/deploy. Can't tell how to export a cab?

  9. #9
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    Hmmm, I can find it right now, either. I think it was on the Build menu, but I'd have to switch to a different computer to check it out. That won't happen for a few hours, hopefully someone else will have a solution for you before that.
    My usual boring signature: Nothing

  10. #10
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    As I said, I tested your code on a PPC emulator, and it worked fine, although the screen didn't fit.

    All I did was select PocketPC2003 emulator from the list of devices, and ran the application.

    You could try Build>Deploy in VS2005 and that should deploy it along with any libraries it needs.

    If you don't use device specific API's and code, an application compiled for a device will run on the desktop
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  11. #11
    New Member
    Join Date
    Jun 2009
    Posts
    1

    Re: Porting a VB 2005 (XP) app to Win CE 5.0 is HARD! Help?

    I had the same problem, also with a mobile C# application.
    It seems to me that only the application .exe file is deployed and not the additonal .NET Compact Framework dll's for f. i. winforms support which is needed by an application dealing with forms.
    I don't know, however sofar, why Visual Studio 2005 doen't deploy those additional libraries to the device. Maybe ask Microsoft ?
    Before this I developed several professional barcode scanner aplications for Win CE 4.2 devices with Visual Studio 2003 and there the additional .NET CF dll's installed perfectly into the Windows directory onto the device, where they should be !

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width