There's no such thing as a stupid question, but they're the easiest to answer.
JoinTour
Login
 
Tag Cloud
access audio avg avg 8 bios blue screen boot bsod computer connection cpu crash css dell desktop dma driver drivers dvd email error excel explorer firefox firefox 3 freeze gimp graphics hard drive hardware hijackthis hjt install internet internet explorer itunes keyboard laptop macro malware monitor motherboard network networking outlook outlook 2003 outlook 2007 outlook express pio problem problems router seo server slow sound sp3 spyware trojan usb video virtumonde virus vista vundo windows windows vista windows xp winxp wireless
Software Development
Search
Search in:
 
Advanced Search
Tech Support Guy Forums > Software & Hardware > Software Development >
Read Window Name


HELLO AND WELCOME! Before you can post your question, you'll have to register -- it's completely free! Click here to join today! We highly recommend that you print a copy of our Guide for New Members. Enjoy!

 
Thread Tools
DavidWalsh's Avatar
Member with 79 posts.
 
Join Date: Nov 2000
21-Jan-2005, 02:24 PM #1
Read Window Name
I am trying to recognise an application by reading its window heading. I am using VB6 but without much luck! I also wouldn't mind knowing its position on screen as well as its height and width, though these are not as important.

Any help would be appreciated.

Last edited by DavidWalsh : 22-Jan-2005 08:59 AM.
Mosaic1's Avatar
Distinguished Member with 7,498 posts.
 
Join Date: Aug 2001
21-Jan-2005, 11:08 PM #2
What application? Are you more interested in getting the Window Handle or just knowing if the app is running? For which OS? XP, 2k or 98? Or for all?

If you tell me what you are trying to accomplish, I will help you get there.
Rollin_Again's Avatar
Distinguished Member with 2,834 posts.
 
Join Date: Sep 2003
Location: Atlanta, GA - Planet Earth
Experience: Brilliant When Sober
22-Jan-2005, 01:38 AM #3
Try the WinSpector spy utility. Download it free here

http://www.windows-spy.com/


Rollin
DavidWalsh's Avatar
Member with 79 posts.
 
Join Date: Nov 2000
22-Jan-2005, 08:58 AM #4
I'm running XP. What I'm trying to achieve is to recognise whether a program is open on screen, not just whether it is running. The reason being is so that I can perform some graphics manipulation on the window. There are a couple of different versions of the program concerned hence the need to recognise the heading because the heading is different depending on the version running.

Thanks for the response by the way. Much appreciated.
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
22-Jan-2005, 10:24 AM #5
Mosaic1's Avatar
Distinguished Member with 7,498 posts.
 
Join Date: Aug 2001
22-Jan-2005, 02:53 PM #6
That's the function. I highly recommend this site for API in VB
http://www.mentalis.org/apilist/apilist.php

You can find an easy to follow example of using EnumWindows there.
DavidWalsh's Avatar
Member with 79 posts.
 
Join Date: Nov 2000
22-Jan-2005, 06:17 PM #7
I tried that API routine and it just gave me a messagebox with a list of 7/8 digit numbers in it. Am I missing something as I want to actually read the title, ie. the title of this window is:"Tech Support Guy Forums - "........... This is what I want to read.
coderitr's Avatar
Distinguished Member with 3,080 posts.
 
Join Date: Oct 2003
22-Jan-2005, 06:30 PM #8
That number is the handle to the window. You can then use the GetWindowText( ) function to get the title bar text of the window.

http://msdn.microsoft.com/library/de...windowtext.asp
Fredledingue's Avatar
Senior Member with 404 posts.
 
Join Date: Aug 2003
Location: Klaipéda Lithuania
23-Jan-2005, 03:55 PM #9
AutoItX do it for vbs.
Look for AutoIt website.
DavidWalsh's Avatar
Member with 79 posts.
 
Join Date: Nov 2000
23-Jan-2005, 06:25 PM #10
Thanks for all the help. I shall be looking into them and reporting back my findings.
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are Off
Refbacks are Off

You Are Using:
Server ID
Advertisements do not imply our endorsement of that product or service.
All times are GMT -4. The time now is 06:45 PM.
Copyright © 1996 - 2008 TechGuy, Inc. All rights reserved.
Powered by vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Powered by Cermak Technologies, Inc.