FindWindow... Looping help
Im new to c# and managed to get findwindow working so that it detects if a window with a giving name is open or not but my problem is it only checks once and thats right when the program is started. How would I go about calling the check every X amount of seconds?
Thanks in advance for your help
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Matt LaVoice3 pointsPosted Jun 25, 2006, 5:04 AM EDT
Mike GoldRank #50 · 30.6K pointsPosted Jun 25, 2006, 12:59 PM EDT
You probably need to call FindWindow in a timer event. Set the timer interval for x milliseconds.
1) Drag the Windows timer onto the form
2) Set the timer interval in the properties window
2) Start the timer in the OnLoad event of the form
3) handle the timer event in a event_handler and call FindWindow inside
-Mike G