I want to create an application which can copy the tool tip (the tool tips which are shown on the current desktop/window) if I press hot keys. So how can I track whether the current desktop having a tool tip.
Asked
Active
Viewed 402 times
0
-
Couldn't you just use Print Screen to grab a screenshot? Seems like an odd requirement. – Lazarus May 27 '11 at 12:38
1 Answers
1
First, its not possible to use the Managed.Net API to access windows in other applications so you will have to do somthing a bit different.
I guess you could use the Win32 API to enumerate windows and find those of the class Tooltip_Class32
. Then you'd have to read the text on them.
You can enum windows as described on SO here and on PInvoke.net here.
If you limit to just the Tooltip_Class32
then you will only get the tool tip windows.
I'm not sure how windows contructs a tool tip. I'm guessing you can read the text from the tool tip or from some child control window by using the SendMessage
API with the WM_GETTEXT
message like here.
That should get you started, I've never actually done it myself but it seems feasible.