Solved

Window handle valid

Posted on 2002-03-05
3
648 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
ID: 6841841
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
ID: 6841848
Try isWindow:

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

0
 
LVL 20

Expert Comment

by:Madshi
ID: 6846754
IsWindow is correct.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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