Windows Mobile - Compact Framework program as a service?

匆匆过客 提交于 2019-12-21 05:15:10

问题


What is the best way to have my C# Compact Framework program running in the background on a Windows Mobile device ? I need to respond to different events, such as a text message arriving with a specific content. I would like not to start up any UI when the process is started, but just run in the background until UI is needed.

How can this be done ?


回答1:


Just create the app as a Console app. If you need a message pump, you need to call Run without any parameters, and the CF doesn't have that. OpenNETCF's Application2 class in the SDF does. At that point you can raise a UI any time by creating and showing a Form as usual.

You cannot create a true service for CE or WinMo with managed code because EE Hosting is not supported.




回答2:


How about this project?

managedserviceswm.codeplex.com



来源:https://stackoverflow.com/questions/236184/windows-mobile-compact-framework-program-as-a-service

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!