Make main form inactive while child is active.

Posted on 2011-09-27
Medium Priority
Last Modified: 2012-05-12
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?
Question by:sstairs
  • 2
  • 2
LVL 40

Accepted Solution

Jacques Bourgeois (James Burger) earned 1000 total points
ID: 36711845
Disable the Timer before opening the second form.

Reenable it when the child closes.
LVL 86

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 1000 total points
ID: 36712007
"... 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?

Assisted Solution

sstairs earned 0 total points
ID: 36712225
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.

Author Closing Comment

ID: 36898967
Further research turned up a solution.
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 36712245
Why not use a regular timer instead of a loop?...

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

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.

Join & Write a Comment

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
To export Lotus Notes to Outlook PST or Exchange and Domino Server files to Exchange Server or PST files with ease, go for Kernel for Lotus Notes to Outlook conversion tool. Through the video, you can watch the conversion process. A common user with…

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question