Solved

Updating a Showdialog Form Dymanically

Posted on 2011-09-12
3
273 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
Comment Utility
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
Comment Utility
0
 
LVL 40

Expert Comment

by:Jacques Bourgeois (James Burger)
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

772 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

12 Experts available now in Live!

Get 1:1 Help Now