Question get the text of the active form?

Terzaghi

Member
Joined
Feb 25, 2010
Messages
8
Programming Experience
Beginner
I need to build a program that can get the form's name of whatever window/application that is currently active/in focus. How do I do that?
 
Last edited:
You'll need to use the GetForgroundWindow API and the SendMessage API to send the WM_GETTEXT message. Note that these are low-level Windows functions, not part of the .NET Framework. If you search the web you'll find examples of each, perhaps even both together.
 
You'll need to use the GetForgroundWindow API and the SendMessage API to send the WM_GETTEXT message. Note that these are low-level Windows functions, not part of the .NET Framework. If you search the web you'll find examples of each, perhaps even both together.

i dont get it. sorry i'm nub but i'll do some google on it tonight. i'll let you know if i get stuck. thanks!
 
Back
Top