Properties of external Processes or Forms

Basic4Life

Member
Licensed User
Is it possible to get Properties of running processes or forms on the Desktop, which are not from B4PPC?.

I tried using the WindowsHandle from the threading library, and create some PropertiesGrid with the door lib, but I have no clue what I am actually doing, so it was more like guessing, and obviously not successful to say the least.
Thanks for any help
 

agraham

Expert
Licensed User
Longtime User
The Threading library MainWindowHandle property is only valid for a Process object that has started a graphical application and is the handle for that application.

By PropertyGrid do you mean the .NET control? I have a Basic4ppc library, that I've not released, that wraps that control but PropertyGrid needs a .NET object reference which cannot be obtained from a WindowHandle. What is it exactly that you are trying do?
 

Basic4Life

Member
Licensed User
Thanks for your quick response. I want to get properties like size and position of a window from another application. Do make a transparent overlay displaying additional data but I need to have to proper location to place the additional info.
 

agraham

Expert
Licensed User
Longtime User
I'm afraid you are not providing much information. Is this other application a .NET application? How do you expect to select or identify this application as the one you want to target? Is it just the window location, and presumably size, that you want to find or is there other data within it as well? Where does a PropertyGrid fit into what you want to do?
 

Basic4Life

Member
Licensed User
sorry my mistake. I do not know much about .Net so maybe my ideao of using a PropertyGrid is way off.
Finding/Identifying all open Windows and get their location and size, that's what I would like to do. So it's not limited to a single program, which does not have to be a .Net app.
I thought using the Windowtitle as the method for identifying the target window, however obtaining the title is the problem.

I think user32.dll might offer the required functions, and I found your ExitWindows.dll thread, which I am trying to use as an Example to wrap my user32 functions.
 

agraham

Expert
Licensed User
Longtime User
I'm not particularly familiar with the Win32 API so if it is not .NET Windows Forms based I can't really help. I believe that you can find the handles of all the top-level windows, which are children of the Desktop window but I don't know how. Once you have a window handle for a .NET based applications's window I know how to get an object reference to it and obtain the size and location by Reflection. However I don't know how to do this for a native code application.
 

Byak@

Active Member
Licensed User
maybe i'm not undestand... but dzHW.dll can get WindowRect
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…