Solved

Top Level Form handle

Posted on 2004-08-09
3
185 Views
Last Modified: 2010-04-05
If I have a main form in an application, and then a button on that main form that opens up a sub form on top of the Main form.

How can I get the handle of the subform (the top level form)?

regards
Myles
0
Comment
Question by:myleseven2
3 Comments
 
LVL 7

Accepted Solution

by:
LRHGuy earned 75 total points
Comment Utility
Try using:

H:=Screen.ActiveForm.Handle;

0
 
LVL 2

Expert Comment

by:wolsen
Comment Utility
use GetTopWindow

From the windows SDK help:

"The GetTopWindow function examines the Z order of the child windows associated with the specified parent window and retrieves the handle of the child window at the top of the Z order."
0
 

Author Comment

by:myleseven2
Comment Utility
That is awesome thanks
Myles
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

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…
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…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

744 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

16 Experts available now in Live!

Get 1:1 Help Now