Hi,
I have a dictionary program. It will run continuously in the background.
When the user clicks ctrl+rightMouseButton, it will select the
word at the focus, and send it to the dictionary module.
In order to do that, I think I have to use several threads:
1- For the application waiting in the background
2- Listening for the keyboard events in general
3- Listening for the mouse events in general
4- Listening for the focusing events
5- Listening for the clipboard events (already running)
There will be at least 2 hotKeys: one for program activation, and one for the word selection.
When word selection key activated, I will send a double-click to the component at the focus in order to select the word at the focus, and then send a ctrl-c to copy the selected word to the clipboard.
How should I run those threads altogether?
While listening for the clipboard, there is a sleep(100) method. What does happen during that period? Does waiting affect only that
thread, or the whole application? Will it affect the general performance of the application?
As you can see easily, I know very little about threads.
What can I do? What should I do?
Especially I need some simple samples.
Thanks in advance.
Ahmet Aksoy