473,396 Members | 1,836 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,396 software developers and data experts.

Configuring WindowsService thru SystemTray.. Urgent help

hi ,

I have a System tray application which configures a Windows Service through
it (Both written in C#). I have the service polling to a database table
every 30 seconds , the time interval is hard coded into the Service code .
What I need is to configure the time interval thru the SystemTray
application .
Please advice me on How to do it ?.

Thanks
Sylesh
Nov 15 '05 #1
4 2546
Sylesh,

It's just a matter of communicating with the service using the
application you already have. Whatever mechanism you are using, extend it
to send a message or call a method that will set this property. When the
service receives the message/call, it should stop the timer, set the new
interval, and restart.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sylesh Nair" <sy*************@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
hi ,

I have a System tray application which configures a Windows Service through it (Both written in C#). I have the service polling to a database table
every 30 seconds , the time interval is hard coded into the Service code .
What I need is to configure the time interval thru the SystemTray
application .
Please advice me on How to do it ?.

Thanks
Sylesh

Nov 15 '05 #2
FG
As Nicholas proposed, I thought about a trivial (but maybe not so useful)
example of a communication between those 2 application.
It could be through a configuration file in which the SysTray application
should write a new value for an existing setting. The service will read from
time to time the value and restart the timer with the new value for
"interval".

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in
message news:O%****************@TK2MSFTNGP11.phx.gbl...
Sylesh,

It's just a matter of communicating with the service using the
application you already have. Whatever mechanism you are using, extend it
to send a message or call a method that will set this property. When the
service receives the message/call, it should stop the timer, set the new
interval, and restart.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sylesh Nair" <sy*************@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
hi ,

I have a System tray application which configures a Windows Service

through
it (Both written in C#). I have the service polling to a database table
every 30 seconds , the time interval is hard coded into the Service code .. What I need is to configure the time interval thru the SystemTray
application .
Please advice me on How to do it ?.

Thanks
Sylesh


Nov 15 '05 #3
Hi Nicholas &FG,
thanks a lot for the reply ..
but how do i write to a configuration file , that's meant to be read-only .
I used the IsolatedFileStorage class in C# but that does not work on runtime
..
sylesh
"FG" <ca*******@hotmail.comu> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
As Nicholas proposed, I thought about a trivial (but maybe not so useful)
example of a communication between those 2 application.
It could be through a configuration file in which the SysTray application
should write a new value for an existing setting. The service will read from time to time the value and restart the timer with the new value for
"interval".

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote in message news:O%****************@TK2MSFTNGP11.phx.gbl...
Sylesh,

It's just a matter of communicating with the service using the
application you already have. Whatever mechanism you are using, extend it
to send a message or call a method that will set this property. When the service receives the message/call, it should stop the timer, set the new
interval, and restart.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sylesh Nair" <sy*************@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
hi ,

I have a System tray application which configures a Windows Service through
it (Both written in C#). I have the service polling to a database table every 30 seconds , the time interval is hard coded into the Service

code . What I need is to configure the time interval thru the SystemTray
application .
Please advice me on How to do it ?.

Thanks
Sylesh



Nov 15 '05 #4
Sylesh,

I don't think that the file is a good idea, as you would have to use
some sort of polling/notification mechanism. Personally, I think that you
should host a remoted object in the service, and then have the tray app
connect to the remoted object and perform the communication through there.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sylesh Nair" <sy*************@hotmail.com> wrote in message
news:uu**************@tk2msftngp13.phx.gbl...
Hi Nicholas &FG,
thanks a lot for the reply ..
but how do i write to a configuration file , that's meant to be read-only .. I used the IsolatedFileStorage class in C# but that does not work on runtime .
sylesh
"FG" <ca*******@hotmail.comu> wrote in message
news:OA**************@TK2MSFTNGP11.phx.gbl...
As Nicholas proposed, I thought about a trivial (but maybe not so useful)
example of a communication between those 2 application.
It could be through a configuration file in which the SysTray application should write a new value for an existing setting. The service will read from
time to time the value and restart the timer with the new value for
"interval".

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard.caspershouse.com> wrote

in
message news:O%****************@TK2MSFTNGP11.phx.gbl...
Sylesh,

It's just a matter of communicating with the service using the
application you already have. Whatever mechanism you are using, extend it to send a message or call a method that will set this property. When the service receives the message/call, it should stop the timer, set the
new interval, and restart.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Sylesh Nair" <sy*************@hotmail.com> wrote in message
news:ec**************@TK2MSFTNGP12.phx.gbl...
> hi ,
>
> I have a System tray application which configures a Windows Service
through
> it (Both written in C#). I have the service polling to a database

table > every 30 seconds , the time interval is hard coded into the Service

code
.
> What I need is to configure the time interval thru the SystemTray
> application .
> Please advice me on How to do it ?.
>
> Thanks
> Sylesh
>
>



Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: LZ7MSQ | last post by:
Hello, How can i get back my ServerIcoon in the systemtray ? SQLServer and SQLAgent services are running, but I can't not connect to the server!
0
by: Sphere | last post by:
If I'd like to read out the tooltip of icq.exe, that is shown in the systemtray. How do I have to do that, please help me.
0
by: Michael Bodek?r | last post by:
Hi, I am making a shell replacement application in VB.NET. Would anyone know where to find samples on how to create your own systemtray in VB.NET? I have already got the code for VB6, but I...
10
by: Ed Stevens | last post by:
A tale of woe, and a question . . . Last week my boss said to me "we've installed DB2 Connect on this Solaris box. Make it work." Now, I've barely seen DB2 Connect on Windows, having fumbled...
2
by: Kiran | last post by:
I am able to add my applicatoin to system tray. The problem I am facing here is.... I want add more number of instances (System tray Icons) of a single application to the system tray. At...
3
by: Frank Uray | last post by:
Hi all I have written a WindowsService in C# 2005. I am running this service on a 64bit Windows Server 2003 and I like to run some Interop.Excel within this service. It seams that Interop...
1
by: Michal Sodomka | last post by:
Hi, is there a clean way how to install windowsservice with some SETUP.EXE project ? I tried this out but after that installation I see my service in servicemanager not ! I also tried it with...
1
by: krsk4u | last post by:
Hi all, Am new to Multithreading. I need a help from you. I want to write a WindowsService in VB.Net, which will ping all the systems in the network using its IP Address which is stored in a...
2
by: =?Utf-8?B?c2lwcHl1Y29ubg==?= | last post by:
Have a complex process where I need to Import a large amount of data then run some transformations on this data then import into DataBase. The transformation involves multiple fields and multiple...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.