<p>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.</p>

<p>How can this be done ?</p>

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.