473,320 Members | 1,969 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

System Tray - Service - Communication

7
Hi there,

we are creating some automated backup solution for some user application (let's say "UserApp" ;)). Now, the backup service is working perfectly.

But there's a problem: the backups cannot be created if some user is working with the "UserApp" at the same time, because of locked files, etc. So the service should be able to tell the user to close the application and wait until the user does.

As I already know that a service shouldn't (and since Vista: CANNOT) communicate with the user "directly", I thought of a system tray icon where the user also could see whether the service is running.

Now I also partly created such a tray app and it is working well so far.

My big problem is now, that I don't have a clue about creating a client-service-communication. As said, I want the service to send some sort of message to the system tray application, which then perhaps translates that message and informs the user with a ballon tip for example.

Is there a simple way to achieve this?
How would you going to do this?
Which sort of communication would you use? IPC? Pipes? Sockets?

I have read many articles and threads about this topic, but I couldn't find any proper solution and/or how to implement that.

Thanks in advance for helping me ;)

Greetings

Lawyno
May 15 '09 #1
5 3617
Lawyno
7
Is there really no one, who can help me?
I really need a solution very soon and I'm stuck with this one :(
May 19 '09 #2
PRR
750 Expert 512MB
You could use Named Pipes... You can also look into WCF...
A simple approach would be write to a file (in a specified folder) and have your windows form app watch it... Read from file and display the status ... Just make sure your win form app has rights to read the file ...
May 19 '09 #3
Lawyno
7
@DeepBlue
Thx for the reply ;)

I also thought of named pipes. But how do I implement named pipes in C# (or .NET)?

I've read those msdn articles, but they are written for C++ and it seems to me that those methods are not available for C#.

Perhaps I'm searching with the wrong words, but I didn't find any (good) articles/tutorials about implementing named pipes in C# (or .NET).

So can you (or somebody else) please tell me how to do this?

Thank you & have a nice day ;)

Lawyno
May 19 '09 #4
PRR
750 Expert 512MB
Check this article by Peter Bromberg...
May 19 '09 #5
Lawyno
7
Well I somehow managed to get it to work with IPC in the meantime. :)

Working myself through that complicated C#-Named-Pipes-With-Native-Methods-Wrapper-Stuff would have been too much overhead, compared to my (simple) solution.

Thanx anyway ;)

Lawyno
May 26 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: none | last post by:
Hello all, I wrote a shell program a few years ago in VB6 that needs to be modified. The problem I have is this: The SysAdmin uses this shell in place of Explorer, so there is no taskbar. When...
0
by: Carlos Natal | last post by:
Hi all, While creating a windows service using .NET and C# I had to call myForm.ShowDialog() from within a thread I have created inside the OnStart() method. When this window is closed, my...
2
by: Andrew Mueller | last post by:
Hello all, I have created a windows service and now I would like to have a configuration page in the system tray. Basically an icon I can click on which will just interact with an XML file. ...
3
by: Mats-Lennart Hansson | last post by:
Hi, I'm having a hard time getting my service to show a sys tray icon. I've tried to create a separate Windows application where I simply add a notification icon to the form. In the OnStart method...
4
by: utkarsh | last post by:
Hi, I want to develop a Window Service in C# that should be capable of sisplaying the a icon in the window tray. Based on some logic in service, icon should be changed to some other...
6
by: Amongin Ewinyu | last post by:
Hi, I have an application that is controlled by a service. when the service starts, an icon is supposed to be placed in the system tray and this icon is then used to display a balloon...
11
by: Jay | last post by:
Hey There, I have a system tray application that is running, and it needs to communicate with a Windows Service that I wrote. My problem is that if a user switches to another desktop, I need the...
0
by: salahuddin23 | last post by:
I am making a program to run my windows service from system tray, i added Service controller class and all is woking except to put it in system tray. As in VB.NET we can have Application.Run() method...
3
by: Joseph Geretz | last post by:
The conventional approach is easy enough; drop a NotifyIcon onto a Form. When the form is loaded - bingo - the icon appears in the System Tray. I can't use this approach though. I'm writing a...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.