Solved

Make main form inactive while child is active.

Posted on 2011-09-27
5
273 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
Comment Utility
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
Comment Utility
"... 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
Comment Utility
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
Comment Utility
Further research turned up a solution.
0
 
LVL 85

Expert Comment

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

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Zoom web page in asp.net 2 34
Finding if Numbers are ranges 8 29
passing a value with stream reader AFTER a ";" 3 39
Create XML 5 29
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

728 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now