Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Embedded controller UI in Windows Service

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Johnson - 01 Mar 2006 02:31 GMT
I built a Windows Service exe, and a separate exe to control it which has a
nice little icon on the system tray.  I'm wondering if there is a "right" way
to merge the two apps such that:

a) when you installutil the service it automatically puts the notifyicon on
the systemtray
b) it will respond to right-click of the icon (even if stopped?)

Or if they have to stay 2 separate apps, if there's a prescribed way to make
the controller app always around (didn't want to have to Schedule it etc,
just wanted it to start up along with the service).
Simon Murrell - 01 Mar 2006 08:05 GMT
Hello Tim

Keep them separate. If you combine the two into one exe, you will not be
able to start the service again. You could get your users to use the Services
applet to start the service and then use the system tray portion to stop it.
Rather separate them as that is what SQL Server has done with the service
exe and then the Service Manager exe which sits in the system tray.
Hope this helps...

Regards,
Simon

> I built a Windows Service exe, and a separate exe to control it which has a
> nice little icon on the system tray.  I'm wondering if there is a "right" way
[quoted text clipped - 7 lines]
> the controller app always around (didn't want to have to Schedule it etc,
> just wanted it to start up along with the service).
Tim Johnson - 01 Mar 2006 09:17 GMT
Makes sense.  I was just trying to figure how to make that icon always be in
the system tray, ie have my svc controller app always running.  I can always
make it a Startup app but I guess I was thinking there might be a prescribed
way to couple the 2 apps - what makes all those other tray icons show up
automatically, aren't most of them related to services or are they just
drivers (wifi, sql server, etc)?

> Hello Tim
>
[quoted text clipped - 19 lines]
> > the controller app always around (didn't want to have to Schedule it etc,
> > just wanted it to start up along with the service).
Simon Murrell - 01 Mar 2006 11:31 GMT
Hello Tim

Well the SQL Service Manager is normally added to the Startup menu
in Windows. That is probably the easiest and cleanest way to do it.

Regards,
Simon

> Makes sense.  I was just trying to figure how to make that icon always be in
> the system tray, ie have my svc controller app always running.  I can always
[quoted text clipped - 26 lines]
> > > the controller app always around (didn't want to have to Schedule it etc,
> > > just wanted it to start up along with the service).
Adam Klobukowski - 01 Mar 2006 11:41 GMT
Simon Murrell napisał(a):
> Hello Tim
>
> Well the SQL Service Manager is normally added to the Startup menu
> in Windows. That is probably the easiest and cleanest way to do it.

I've written a service and service controller that way (2 separate
apps). I have a problem with controler application: it has a windo that
is always opened, only just hidden or shown to the user. It hase close
widget, but it just hides window (no close). The problem is that when
I'm switching machine off, i prevents it. There is no erro message, or
anything, machine just does not switch off. When I exit it manually -
computer can be switched off.

I tried hooking at Application.ApplicationExit do detect application
going down, but it didn't help. How can I distinguish if Form.Closing
event is fired becouse user clicked close widget or becouse system is
going down?

Signature

Semper Fidelis

Adam Klobukowski
atari@gabo.pl


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.