Hi,
I have no idea of remoting.
It's never too late to learn
So what do you need to tray icon for? Do you just need to display the state
of your Windows Server (started, paused, stopped) and allow the user to
start and stop it? In this case, you don't even need .NET Remoting or any
other cross process communication framework. You can simply use the
ServiceController class which is very easy to use.
If you need the user to pass commands to the service, then you need some
way to communicate with the service. You could use raw sockets or named
pipes if you are more familiar with them. If you have never done this sort
of things before then .NET Remoting is you best bet i guess since it's very
easy to learn as long as you are not trying to make overly complicated
things. Have a look on the web, codeproject.com in particular, for some
beginner's tutorials.
Another thing i need only one application. If
i use another windows application then i will have two applications to manage.
That's right, you'll have 2 applications. However, what do you mean by
"managing". Are you thinking of maintenance? In this case, i think that
having 2 applications would be far easier to maintain than having just a
Windows Service with ugly hacks to show a tray icon with context menu in a
reliable way. Having 2 application being the standard way to go to solve
this kind of problem, somebody having to maintain your code will have no
problem understanding what you are doing. If you go the hacking route, then
i hope that you are keeping a very detailled documentation of your code or
it's gonna be a pure horror to maintain.
All that said, if your application is a small app just for yourself, then
you could get away with just a Windows Service showing its tray icon since
you'll know its limitations. I can't help you here since i've never been
able to solve this problem myself (i've never look really hard for a
solution though) but there are surely ways to do whatever you want to do.
If you are developing a "serious" application, then you already know by now
what i think you should do.