Solved

Updating a Showdialog Form Dymanically

Posted on 2011-09-12
3
279 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
3 Comments
 
LVL 85

Accepted Solution

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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.

825 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