Solved

Window handle valid

Posted on 2002-03-05
3
644 Views
Last Modified: 2008-03-10
I have obtained a handle to another window, if I after sometime wants to know if the window is still alive, how do I achieve that ?

Is there some IsHandleValid API ?
0
Comment
Question by:bnz
3 Comments
 
LVL 44

Expert Comment

by:CrazyOne
Comment Utility
Just make a recall of how you retrieved the handle in the first place. If the Window was closed and then reopened it will have a new handle anyway. I my opinion a Window handle should be used as soon as you get the handle and not using it at a later time because things can happen quickly that the handle you have may of expired, at least for that window.
0
 

Accepted Solution

by:
ms99 earned 100 total points
Comment Utility
Try isWindow:

if isWindow(Handle) then begin
  // the window still exists
end;

0
 
LVL 20

Expert Comment

by:Madshi
Comment Utility
IsWindow is correct.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

762 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now