K
K
KvanTTT2012-02-04 14:09:46
C++ / C#
KvanTTT, 2012-02-04 14:09:46

Definition of the word under the mouse cursor?

How to determine which word is currently under the mouse cursor, if it is known that this word is presented in text format (as it happens in the translation programs Lingoes, Lingvo)?
Preferably in C#, and if it works in Mono, then it's absolutely perfect.
PS In Stackoverflow it was not possible to find a universal and detailed solution.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
rasa, 2012-02-04
@KvanTTT

Try using WinAPI. The given link under C ++, rewrite it under C #, for example, using a similar code for sharp.

T
TERMIK, 2012-02-04
@TERMIK

I don’t know how it will look in real life, but theoretically it can be done like this:
if you do it on WPF, then you can create a Grid cell after each space, and place a Label in each cell? in which the word will be stored, then through the MouseMove event it is already possible to determine which Label is under the cursor

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question