?
Solved

Updating a Showdialog Form Dymanically

Posted on 2011-09-12
3
Medium Priority
?
283 Views
Last Modified: 2012-05-12
Hi All,

I'm in the midst of writing a issues tracking app. I've got to the point where all information is captured and ready to  be written  back to the database, or copied to a file share. I was hoping to display a small form that tracks the progress of the issue save, that would prevent the use closing the app till the save was confirmed.

I've created the progress form programmatically and displayed it by showdialog. The issue I've run into is rather a basic one, while the dialog form in being displayed I cannot do anything else. I believe there are two ways forward (happy to be told of more) 1) Create a background thread to perform each of the tasks that need doing, 2) Don't use the showdialog method, use the normal form visible method and disable the form control box.

Any suggestions on the best way forward?

Cheers
Jl
0
Comment
Question by:jaLouden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1000 total points
ID: 36526318
Those are good possible solutions.  You could also use xxx.Show(Me) for the "dialog" and then cancel the closing of the main form and the dialog form via a Flag in the FormClosing() event of both.
0
 
LVL 83

Assisted Solution

by:CodeCruiser
CodeCruiser earned 1000 total points
ID: 36526361
0
 
LVL 40
ID: 36526781
ShowDialog has been designed so that you cannot do anything else while it is displayed. Complaining about it is like complaining that you car slows down when you push the break.

Either use the standard Show or move the code to the form that is displayed with ShowDialog.

It's not completely true that you cannot do anything while a form is displayed as a dialog. The code in the form itself is running.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Well, all of us have seen the multiple EXCEL.EXE's in task manager that won't die even if you call the .close, .dispose methods. Try this method to kill any excels in memory. You can copy the kill function to create a check function and replace the …
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

752 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