Make main form inactive while child is active.

I have a program that has a menu that pulls up a new form.  The main form has a timer that fires every "n" minutes checking for a condition on the PC.  The new form comes up and accepts input, but when you click on the exit button, it won't exit until the delay timer in the main form fires.  How can I make the main form inactive while the child  form is active?
sstairsAsked:
Who is Participating?
 
Jacques Bourgeois (James Burger)Connect With a Mentor PresidentCommented:
Disable the Timer before opening the second form.

Reenable it when the child closes.
0
 
Mike TomlinsonConnect With a Mentor Middle School Assistant TeacherCommented:
"... it won't exit until the delay timer in the main form fires."

How exactly did you implement this "delay timer"?...may we see some code please?
0
 
sstairsConnect With a Mentor Author Commented:
I got if figured out.  I put a sleep(200) in the delay function and it allows the CPU to do other things.  Appreciate the input.
0
 
sstairsAuthor Commented:
Further research turned up a solution.
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
Why not use a regular timer instead of a loop?...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.