Click here to Skip to main content
15,879,326 members
Please Sign up or sign in to vote.
4.92/5 (6 votes)
HI All,

i am trying do this, when the user hover over any word in the system, the program must tell me you hovering over the X word



if any one wan't to say this is can't be done you can see http://www.verbace.com/[^]

this is a dictionary when you hover over any word in the windows he gave you the translation

i don't know how to start, Please Help

any help will be appreciated
Posted
Comments
Sergey Alexandrovich Kryukov 15-Dec-11 14:33pm    
Good question just because of its challenge, voted 5. I don't say this is impossible, but it looks very difficult to me.
--SA
El_Codero 5-Mar-12 18:07pm    
A 5 for this interesting question.

yes it can be done using by using win32 API.
there is a win32 API which return you the handle of specific windows or that can return the
class name of the running windows.
first you have to identify the handle or class name of the window which is under the
mouse pointer then you can get the text of this window or information about the window.
your initial point is

CSS
http://www.c-sharpcorner.com/UploadFile/shrijeetnair/win32api12062005005528AM/win32api.aspx

what are classes

http://www.vb-helper.com/howto_get_window_info_under_mouse.html
 
Share this answer
 
Yeah, this is possible, but not easy to pull off.

The only way I can see this working for the text in any window in the system is if you used OCR techniques to get the boundries of the POSSIBLE word the mouse is hovering over, adjust the boundries as needed to come up with a word candidate, lookup those candidates, adjust as necessary and repeat, but within certain bounds. You really don't want to try and treat the entire screen as a single word and look that up.
 
Share this answer
 
Comments
Mohamed Ahmed Abdullah 16-Dec-11 3:55am    
Thank you Dave Kreskowiak, ok i worked before with image processing but i never worked before with OCR can you tell me how to begin.
Dave Kreskowiak 16-Dec-11 7:55am    
Google for ".net OCR" and start reading?
El_Codero 11-Jun-15 6:52am    
high fived :)
Step 1 is to understand the mouseover events.
Step 2 is to use the mouseover event and mouse position to decide what word the user is hovering over.
Step 3 is to do what you want to do once this has been determined.

Go ahead and try to build this. When you have a more specific question regarding something in the process, feel free to ask and we'll be more than happy to help.

Cheers and good luck.
 
Share this answer
 
Comments
Mohamed Ahmed Abdullah 15-Dec-11 15:08pm    
Thank you Marcus Kramer and SAKryukov i was thinking of this:
1- take a snapshoot of the screen
2- analyze the image (bitmap) by any ocs program or even create my own, to get all the words in the screen
3- map the mouse location with the image and determine the word
but this is a very long way and not powerful at all
and this is a very old and bad school
But now, i found this http://www.codeproject.com/KB/dialog/FindWindow.aspx but i am thinking of, this is the beginning of the road.
Dave Kreskowiak 15-Dec-11 15:22pm    
The problem with using the technique in that article is that 1) not every window suppors WM_GETTEXT and 2) WM_GETTEXT does not let you get the text mapped at a certain location.

OCR is going to be your best option, and no, you don't have to capture the entire screen image, just a smaller section around the mouse.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900