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

Regarding applications running in the background.

Hi!

I have to write an application that runs in the background in the system
tray. It should listen to keyboard events and send messages to another
program that is currently active. Can anyone suggest me solution.

Thank you,


Feb 9 '06 #1
5 3563
> I have to write an application that runs in the background in the system
tray
Use BackgroundWorker or create separate thread.
It should listen to keyboard events and send messages to another
program that is currently active. Can anyone suggest me solution.


You ony have to handle keydown event(s) and communicate with the program you
want.
PK
Feb 9 '06 #2
Hello, Aravind!

A> I have to write an application that runs in the background in the
A> system tray. It should listen to keyboard events and send messages to
A> another program that is currently active. Can anyone suggest me
A> solution.

Listeting program establishes win32 keyboard hooks
( http://www.codeproject.com/csharp/NetWin32Hooks.asp )
( http://support.microsoft.com/kb/318804/ )

Also you have to choose the way of communication, at your disposal are the following ways:
- sockets
- named pipes
- remoting
- memory mapped files
- windows messages ( e.g. WM_COPYDATA )
etc.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot.com
Feb 9 '06 #3
Thank you for your reply. I have to write seperate application that listens
both keyboard n mouse events. It should send messages to another application
(active application) whenever some set of keys are pressed. Does Key hooks
solve my problem or do I need to use BackgroundWorker class??

Thanx

Aravind.

"PiotrKolodziej" wrote:
I have to write an application that runs in the background in the system
tray


Use BackgroundWorker or create separate thread.
It should listen to keyboard events and send messages to another
program that is currently active. Can anyone suggest me solution.


You ony have to handle keydown event(s) and communicate with the program you
want.
PK

Feb 9 '06 #4
Thank you I will try ur suggestions.

"Vadym Stetsyak" wrote:
Hello, Aravind!

A> I have to write an application that runs in the background in the
A> system tray. It should listen to keyboard events and send messages to
A> another program that is currently active. Can anyone suggest me
A> solution.

Listeting program establishes win32 keyboard hooks
( http://www.codeproject.com/csharp/NetWin32Hooks.asp )
( http://support.microsoft.com/kb/318804/ )

Also you have to choose the way of communication, at your disposal are the following ways:
- sockets
- named pipes
- remoting
- memory mapped files
- windows messages ( e.g. WM_COPYDATA )
etc.
--
Regards, Vadym Stetsyak
www: http://vadmyst.blogspot

Feb 9 '06 #5
Why to use thread or backgroundWorker.

Answer. When you press button your application raises an event.
Then you are sending info to other application.
During the sending time, your applicatiion has a "lag".
When you create a seperate thread for sending data, you'r events might be
handled in the same time you are sending info to other program.

If i were you i'd use one thread for sending info, and handle events that i
need to be handled.
If you need info how to create thread you can shoot me emal if you want.

PK
Feb 9 '06 #6

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

Similar topics

1
by: Manoj | last post by:
Hi, I want to know if it is possible to find out through a vb.net application which other applications are running in the background.For example as soon as i load my form I want it to check if a...
29
by: pb648174 | last post by:
I have a very long transaction that runs on the same database that other users need to use for existing data. I don't care if they see data from the transaction before it is done and am only using...
8
by: Mike | last post by:
Hello, I have a few rather urgent questions that I hope someone can help with (I need to figure this out prior to a meeting tomorrow.) First, a bit of background: The company I work for is...
4
by: Cowboy \(Gregory A. Beamer\) | last post by:
Background: ------------- The idea started as a single sign on type of application. Having tested it before, I knew we could institute single sign on using the same Authentication Cookie name (in...
0
by: satya | last post by:
Hi I want to find out what applications are running on my system through vb. Actually I tried using process.processname it gives all process. basically right now I am trying to find whether...
1
by: trialproduct2004 | last post by:
Hi all, I am having slight confusion regarding memory management in .net. Say suppose i have two application one is in C# and other is in MFC(VC++). Both of this application are using lots...
3
by: Henry | last post by:
I know it is possible to store dynamic propterties for applications in XML files. The app.config and the web.config files can be used to store AppSettings... I am just wondering how far one can...
1
by: Ted | last post by:
I managed to get it installed OK, along side MS Visual Studio 2005 (with which I received it). During the install, I made sure I installed everything. I have developed a number of applications...
4
by: Neil Gould | last post by:
Anthony Jones wrote: That it is awaiting user action. Since a While/Wend or some other on-going background activity of a script appears to provide exceptions to the above statement, your usage...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.