tags:

views:

183

answers:

2

Hi, My program A launched program B (both are separate exe's). Now my program B need to find if A have any modal/child window open using A's processID.

Is there any way to do so?

Thanks a lot for your help.

A: 

You might be able to use some of the suggestions from this question (if you don't mind using Win32 calls).

Jason Down
Thanks Jason, I have been trying same thing ;) will update if I succeed
Cool
Sounds like a plan. Good luck.
Jason Down
A: 

I found the soln.
1. Get handle of parent window A.
PerformanceCounter perId = new PerformanceCounter("Process", "Creating Process ID", Process.GetCurrentProcess().ProcessName);

2. Use GetLastActivePopup method to get last active popup (Last popup works in my case :) ) .

Cool