Installing a C# app on Pocket PC

J

Joseph M. Newcomer

I have a brand-new CE 2003-based device (ViewSonic V36). Now I want to port a C# app I've
writte to the pocket PC> I searched a bit in the MSDN and couldn't come up with what I
need to do to install the CLR on the device and then install the app. Pointers or other
advice would be appreciated.
thanks
joe

Joseph M. Newcomer [MVP]
email: (e-mail address removed)
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
 
J

Jimmy Zhu

Hi Joe,

It seems that your device ViewSonic V36 is a Pocket PC 2003 device and you
don't need to install the CLR on it. The .NET Compact Framework is already
supported on your device. You can directly develop your C# application in
the VS.NET 2003 and deploy it to the device through the connection.
Please select smart device application when you create a new project and
choose pocket pc platform then.

For more information regarding development on .NET Compact Framework,
please read the documents below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/ht
ml/NETCompactFrame.asp

For more information regarding development on Pocket PC 2003 devices,
please read the documents below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win_ce/htm/
pwc_programmingthepocketpc.asp

Jimmy Zhu
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 
J

Joseph M. Newcomer

Well, this still doesn't answer my question. For example, the two links below are
all-but-useless, having little technical content (and that's after they were reassembled
because the linebreak screws up the hyperlink). And the advice to select a "smart device
application" when I "create a new project" doesn't suggest what steps I should take to
convert an EXISTING project to run on the PocketPC ***as well as on a standard
desktop/laptop***. The project is about 16K lines of code and can't be started over as a
Pocket-PC-only app without massive pain and a resulting maintenance nightmare. Since there
does not appear to be anything as simple as a traditional .exe file--that is, a single
file that would represent the complete set of byte codes (at least nothing I
recognize)--and all my attempts to build an "assembly" have essentially resulted in deep
frustration, I'm not sure how to proceed. That's why I was asking the question.

Just to add to the confusion, the aspect ratio of the form is such that it needs to appear
rotated on the pocket PC. I've heard this is easy, I just can't find out how.
joe

Hi Joe,

It seems that your device ViewSonic V36 is a Pocket PC 2003 device and you
don't need to install the CLR on it. The .NET Compact Framework is already
supported on your device. You can directly develop your C# application in
the VS.NET 2003 and deploy it to the device through the connection.
Please select smart device application when you create a new project and
choose pocket pc platform then.

For more information regarding development on .NET Compact Framework,
please read the documents below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnanchor/ht
ml/NETCompactFrame.asp

For more information regarding development on Pocket PC 2003 devices,
please read the documents below:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/win_ce/htm/
pwc_programmingthepocketpc.asp

Jimmy Zhu
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.

Joseph M. Newcomer [MVP]
email: (e-mail address removed)
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
 
J

Jimmy Zhu

The .NET Compact Framework is a subset of the .NET Framework class library
and also contains classes exclusively designed for it. It inherits the full
.NET Framework architecture of the common language runtime and managed code
execution. It is designed specifically for resource-constrained devices,
such as PDAs and smart mobile phones. Since there is some difference
between .NET Framework and .NET Compact Framework, it is certainly a little
painful to port the code from desktop/laptop to smart devices. Assume you
may use the classes in desktop application which .NET Compact Framework
does not support, the code may need to redesign to fit the .NET Compact
Framework and smart devices. The difference and resolution should be
handled case by case, and there is no general resolution for this, I think.

As the aspect ratio issue on a Pocket PC device, the screen's height is
greater than it width. This is different from the standard desktop screen,
which has a width greater than its height. You must be aware of this
narrower display when you port your application's forms. Controls may be
resized and rearranged vertically rather than horizontally to avoid making
the user scroll the display horizontally to see all the controls.

Jimmy Zhu
Microsoft Developer Support

This posting is provided "AS IS" with no warranties, and confers no rights.
Please reply to newsgroups only. Thanks.
 
J

Jan Roelof de Pijper

I have a brand-new CE 2003-based device (ViewSonic V36). Now I want to port a C# app I've
writte to the pocket PC> I searched a bit in the MSDN and couldn't come up with what I
need to do to install the CLR on the device and then install the app. Pointers or other
advice would be appreciated.
thanks
joe
Hi Joe,

I made the same frustrating discovery that you did: The .exe generated
by a "Windows Application" project cannot be used on the PocketPC,
since the Compact Framework (which is already present on your
2003-based PocketPC) is a subset of the .NET framework. The other way
around works: an .exe generated by a "Smart Device Application"
project runs on the PC as well. There goes your platform independence.
Maintaining a single code base thus seems to be possible only by
starting out with a "Smart Device Application" project. Not much use
to you, I realize.

Good luck!
Jan Roelof de Pijper

By the way, nice to see you *asking* a question for a change :) I have
seen your name many times, but only in helping people out. And thanks
for your articles - they have been fun useful always. I have never
again used GetDlgItem!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top