Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

API gurus: how do i get a window title using its handle? 1

Status
Not open for further replies.

ctlin

Technical User
Apr 17, 2002
77
US
I know about the findwindow technique. How do I do the reverse of that? That is, knowing the handle of the desired window, how can I grab its title? What other information can I grab knowing just the handle? Thanks
 
The GetWindowText API should give you the title

Dim WinTitle as String

WinTitle = String(255, chr(0))
GetWindowText Me.hWnd, WinTitle, 254
WinTitle = Left(WinTitle, InStr(WinTitle, Chr(0)) - 1) Good Luck
--------------
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top