Solved

Make main form inactive while child is active.

Posted on 2011-09-27
5
274 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

786 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