Trevor,
The models for an application and a service are different from each
other. For example, an app usually requires some sort of user interaction,
whereas services are interacted with in a different manner. Also,
applications usually have UI, whereas a service will not.
What you should do is separate your business logic (not involving UI)
into another assembly, then have the Windows Application and the Service
project reference it.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Trevor" <tr****@spam.comwrote in message
news:%2****************@TK2MSFTNGP04.phx.gbl...
In C++ you can allow your Windows program to act as a Windows Service by
implementing some functions required by the Service Control Manager. This
same application could be written in such a way that the application could
run as a regular Windows Application or as a Windows Service. How can I
do this in C#? I am using Visual Studio 2003.