Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


How do I get a windows title text?

Posted on 1999-06-30
Medium Priority
Last Modified: 2010-05-02
I need to get the titles of all windows open.
Or I need to get just the title of the IE window how do I do that?
Question by:Pavel040997
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1521187
 Hi. You need to use API programming.

  Take a look at:,

  Good luck!

Accepted Solution

davepcam1 earned 200 total points
ID: 1521188
Hi there,
All you need to do is stick this in a module

Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long

and you call it as if you were getting a property,

its simmilar to the APPACTIVATE command in VB

Expert Comment

ID: 1521189
If you want to find the handles to Internet Explorer Windows then you could try using FindWindow API which has 2 parameters Classname and window caption

Classname for Internet Explorer is IEFrame

if you know both parameters then its findWindow("IEFrame","MyCaption")

else if you only know one then you can use it in this fashion

FindWindow("IEFrame", 0&) or FindWindow(0&,"Mycaption")

0& is null terminated string

Featured Post

New benefit for Premium Members - Upgrade now!

Ready to get started with anonymous questions today? It's easy! Learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question