Is it possible to run a Windows Form application on a Windows CE platform?

I am new to Windows CE development and have not done it yet. You need to advise an expert here.

In our current project, we are developing a client-server application. The client side uses a Windows form application that is based on Windows XP, while the server is a web-based application.

This question is related to the client application (Windows Form). This application uses Sql Server Express Edition to store data. Data is stored in the format of an XML object. It can also transfer data from the client to the server through the web service. It also interacts with hardware such as a magnetic stripe reader, contactless smart card reader, and thermal printer. Most of the communication between the hardware device and the systems is based on the Serial Port. The configuration uses the standard app.config and multi-threaded application.

There is a new requirement to use a handheld device that uses the Windows CE platform. This PDA included essential equipment such as a contactless smart card reader, a printer, and a magnetic strip reader. Instead of developing a new client application, is it possible for me to convert my current application that is based on Windows XP to Windows CE? If so, how can I do this? If not, is this any other brilliant suggestion to do this?

Thanks in advance. Software engineer

+4
source share
6 answers

Yes, this is possible using the .NET compact framework.

However, you should understand that CF is a subset of the complete .NET platform, and the CE CLR version has different limitations than the desktop version.

You can reuse most of your code, but you will have to spend a lot of time reviewing your user interface and changing the code to get around the differences and limitations of the compact structure.

+4
source

It will take some effort, but it is possible. Windows Forms does not match Windows Mobile, as the Compact Framework is just a subset of the .NET Framework.
In addition, there will be some restrictions that you should note, especially about memory allocation (WinCE restrictions up to 32 MB, which will be allocated for one application), threads and limited computing resources (for example, in my corporate application, some screen changes by independent threads).

+1
source

As already mentioned, the .NET Compact Framework is the way to go.

Useful hint: To determine if something CF is supported, the MSDN pages have a small icon that, if you scroll, says ".NET Compact Framework Supported". For example, you go to WaitHandle Methods, you can see that WaitOne is supported, but not WaitAny or WaitAll. This may give you a better idea of ​​how much you might need to change.

+1
source

The APIs are significantly different in Windows CE, some aspects can be easily ported, but will probably require significant modification.

0
source

Maybe, but you have to limit yourself to what's available in the .NET compact framework .

This framework release is designed to work with embedded CE devices and windows.

0
source

And the database technology you are looking for is SQL Server Compact Edition (aka SQLCE).

An instance of the SQL CE database is a single file (.sdf) in the local file vault (like the old Access database stuff) and does NOT start as a separate service. Therefore, make sure that you carefully close the database connections (use the finally clause!).

From a brief reading of your application context, I don't think you will have a massive problem with multiple connections / connections.

Annoying Windows Forms stuff on WinCE:

  • sllllooooowwww (graphics accelerator unavailable or something else)
  • shortcuts are size independent, readonly multi-line text fields - this one thing sometimes falls on
  • the text on the buttons does not carry the word
  • animated GIFs are not supported by PictureBoxes

By the time you have processed the code running on your device, it will be very difficult for you to redirect it back, so look to completely save the new tree in your original element ... :(

0
source

Source: https://habr.com/ru/post/1301713/


All Articles