There's a program called Process Manager which was made in VB and has its source code released. It can do just what you describe - you wave your mouse over areas of various windows and it tells you the text contained in text boxes, the captions on buttons, check boxes, etc.
I can't get to the site now for some reason, so I'm hosting it myself, here (the program, not the site :P):
- Download Link -
In that ZIP file is a setup for Process Manager, and the source code, and a ReadMe.
It was made in
Visual Basic 5, although it works for me in
VB6 too, except for when it first starts - it will come across a problem, but if you choose to
Debug and drag the yellow pointer down to
End Sub, the program works from then on.
Their site, according to the ReadMe, is:
http://www.rhaminisys.com
But for some reason I can't access it at the moment.
Good luck with using some of that massive
149KB of code, and remember to give credit if you manage to get it to work in you program! ;)
(Not to me, I mean to RHA Minisystems... >_<)