473,320 Members | 1,856 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Modeless Dialog Not Responding

The scenario is this:

My UI thread creates a worker thread that performs some tasks and
periodically updates the screen. All well and good, as it does this by the
usual Invoke mechanism. If I want to stop the background process, I can
click a button on the toolbar to stop it, as the UI is nice and responsive.

At some point, the worker thread becomes idle, waiting for an external
(non-user) event. At this time, I want a modeless dialog to appear, with a
message inviting the user to halt the task if required. The dialog just
contains a message and a stop button.

The problem is, when I display the dialog, it does not refresh, so does not
draw fully, and no amount of clicking on the button has any effect.

My toolbar buttons still respond, so why doesn't my dialog button do
anything?

I suppose I could stick a DoEvents somewhere, but I have an instinctive
dislike of this as a solution, as it seems to me that it frequently hides
the real problem, and possibly hides bad design.

Any and all suggestions welcome.

TIA

Charles
Feb 6 '06 #1
3 1549
Which thread are you displaying the dialog on? The worker thread or the
main form thread?

- NuTcAsE

Feb 6 '06 #2
The dialog is created from the worker thread, but if there is a way for the
worker thread to create the dialog on the UI thread then that would be good.

Charles
"NuTcAsE" <ra********@gmail.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com...
Which thread are you displaying the dialog on? The worker thread or the
main form thread?

- NuTcAsE

Feb 6 '06 #3
ccm
1
Charles, did you find out a solution for this problem? Thanks.


The dialog is created from the worker thread, but if there is a way for the
worker thread to create the dialog on the UI thread then that would be good.

Charles


"NuTcAsE" <rao.ritesh@gmail.com> wrote in message
news:1139258205.854253.202530@z14g2000cwz.googlegr oups.com...[color=blue]
> Which thread are you displaying the dialog on? The worker thread or the
> main form thread?
>
> - NuTcAsE
>[/color]
Mar 17 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Rikkert | last post by:
I can't get my custom-made modeless dialog box (Visual C++.net Win32) to respond to clicking the close button or pressing Alt-F4. I am using the IsDialogMessage to check if messages are for my...
1
by: Carmine | last post by:
I'm currently writing a small program that churns on a repetitive task while displaying a progress & cancel modeless dialog. I've been having problems due to threadlocking, and I was wondering if...
0
by: Andrew | last post by:
I get a Null Reference Exception if I close a modeless form (that is, a form displayed using Show()) when a selection is made from a ComboxBox. If the form is modal (displayed using ShowDialog())...
2
by: Legendary Pansy | last post by:
Hello, I'm trying to accomplish the impossible by trying to do something equivalent of this example found here http://www.c-sharpcorner.com/Code/2003/Dec/DialogTutorial.as Starting with "Listing...
1
by: andrew | last post by:
Hi there, I'm having a problem with a modeless form in my app. I have a main form in my app and a socket that waits on data from a server (I use BeginReceive/EndReceive for that) and when I...
2
by: Charles Law | last post by:
The scenario is this: My UI thread creates a worker thread that performs some tasks and periodically updates the screen. All well and good, as it does this by the usual Invoke mechanism. If I...
2
by: proit_123 | last post by:
I am working on a windows forms application and have the following requirement. · I need to display a modeless dialog from the main form. o This allows user to continue to work with the...
8
by: proit_123 | last post by:
I am working on a windows forms application and have the following requirement. I have two projects in my application Project A and Project B. And Project A has the reference of Project B. I...
0
by: Ralstoj | last post by:
Hi I am programing in Autocad with VB Autodesk have not given users access to new note function in Autocad CIVIL3d API. I am trying to work round this by creating notes using the sendkey...
3
by: DoB | last post by:
What is the preferred way to refresh modeless dialogs? I am using the modeless dialog that shows a progress of a sequential process. The dialog class has nonvisual properties containg the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.