2

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.

Dipak
  • 443
  • 6
  • 17

2 Answers2

3

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

Community
  • 1
  • 1
Jason Down
  • 21,731
  • 12
  • 83
  • 117
2

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 :) ) .

Dipak
  • 443
  • 6
  • 17