Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a c# program that watches another application(process) and needs to act when a Dialog is closed.

My program :

- calls a save dialog in another app
- a dialog window opens saying info is being saved
- I am looping and need to know when this dialog closes (ie save is complete)

Currently I use the following but it does not work as the name varies.

fileDialog = FindWindow("#32770", "Download complete");

The dialog has variable names so what I think I need to do is to

- Call a method to Find All Dialog Windows #32770
- I can then either count them and when count decreases by one I can assume completion OR I can check the names and look for a subset of text.

I am new to WinAPI so if anyone can give me a decent code snippet then that would be great.

I have read many web pages but have not really understood the solutions.

Thanks in advance and have a great weekend.
Posted
Comments
Sergey Alexandrovich Kryukov 31-Jul-15 20:07pm    
Why?!
—SA
sreeyush sudhakaran 4-Aug-15 6:42am    
Please refer here :http://pinvoke.net/default.aspx/user32/EnumWindows.html

1 solution

Please refer here :http://pinvoke.net/default.aspx/user32/EnumWindows.html
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900