Solved

Make main form inactive while child is active.

Posted on 2011-09-27
5
275 Views
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?
0
Comment
Question by:sstairs
  • 2
  • 2
5 Comments
 
LVL 40

Accepted Solution

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

Reenable it when the child closes.
0
 
LVL 85

Assisted Solution

by:Mike Tomlinson
Mike Tomlinson earned 250 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?
0
 

Assisted Solution

by:sstairs
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.
0
 

Author Closing Comment

by:sstairs
ID: 36898967
Further research turned up a solution.
0
 
LVL 85

Expert Comment

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

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

856 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