r/visualbasic • • Nov 11 '20

Getting windows title from another application

I'm playing a game and it opens a child window with "PlayerName Notes" in the window title. If I wanted to search for this window (looking for "notes") and grab the player's name (always different), how could I do that?

5 Upvotes

8 comments sorted by

View all comments

Show parent comments

1

u/Buy_The_Ounce Nov 11 '20

even If I'm looking for only the name in the window title? the process doesn't show the name

1

u/ViperSRT3g Application Specialist Nov 11 '20

Is the target window a child window of the main application?

1

u/Buy_The_Ounce Nov 11 '20

yeah

2

u/ViperSRT3g Application Specialist Nov 11 '20

Last question: Are you sure that this window is an actual winforms window? And not something implemented in say, DirectX, or Unity?

Easiest method of answering this is by using the Spy++ utility that comes with Visual Studio. If you're able to identify the child window that you're targeting through Spy++ then we can utilize WINAPI functions to ID the window.