none
Windows service to show icon in system tray and windows form ...How???

    Question

  • I need to be sure is it can be done ..or global concept of How can be done...

    I need to indicate that my windows service is on.(..to run) - to show some custom icon in system tray..
    also when double click on it I need to open one windows form to show some data from Database...

    I work in VS C# 2005 ... I know that maybe it can be done directly ... I think that make simple windows application that show that one form with data from Database and to some way force it to show when I click on icon in system tray....but I how to force service to show icon tray

    I need I was clear ...
    any idea will be useful

    Laslo

    Friday, September 29, 2006 7:38 AM

Answers

  • a Windows Service runs in the background - has no relevance to the desktop/user. You may need to create a client app also, like SQL Server Agent where the client version has an icon in the systray but interacts with the service.

    take a look at this on how to create a systray icon for the client app in your case:

    http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=643672&SiteID=1

     

    you would add a reference to your service in the client app, and check its status (not entirely sure how the ServiceController works so you may wish to check it out) and display the icon accordingly.

    I hope this helps you in some way, even though it's very small info!

    Friday, September 29, 2006 9:36 AM
    Moderator