473,324 Members | 2,178 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,324 software developers and data experts.

Wait while processing dialog boxes (threading?)

I'm doing image conversion in my application and it seems to take some
time on some tasks. I'd like to show a "Converting..." type message in a
dialog box or splash screen of sorts.

The problem is that when I call ShowDialog() the app waits for the
dialog to close before it continues to process. Is there a way to show
the dialog while doing the conversions and close it when it's done
without using threads? Truth is, I don't want to deal with threading if
possible :)
Apr 19 '06 #1
3 2946
Dustin Davis wrote:
I'm doing image conversion in my application and it seems to take some
time on some tasks. I'd like to show a "Converting..." type message in a
dialog box or splash screen of sorts.

The problem is that when I call ShowDialog() the app waits for the
dialog to close before it continues to process. Is there a way to show
the dialog while doing the conversions and close it when it's done
without using threads? Truth is, I don't want to deal with threading if
possible :)


You can use the Application.DoEvents() routine to let the OS free up the
time to do the redrawing of the window. But this will slow down your
processing. Really should do it in threads.

Chris
Apr 19 '06 #2
Okay, so if I have the following code function:

Function SaveFile(ByVal FileName As String) As Boolean
' Save the file as FileName
Return True
End Function

Can I call this function with a Thread, or do I need to rewrite it somehow?

Chris wrote:
Dustin Davis wrote:
I'm doing image conversion in my application and it seems to take some
time on some tasks. I'd like to show a "Converting..." type message in
a dialog box or splash screen of sorts.

The problem is that when I call ShowDialog() the app waits for the
dialog to close before it continues to process. Is there a way to show
the dialog while doing the conversions and close it when it's done
without using threads? Truth is, I don't want to deal with threading
if possible :)


You can use the Application.DoEvents() routine to let the OS free up the
time to do the redrawing of the window. But this will slow down your
processing. Really should do it in threads.

Chris

Apr 19 '06 #3
Anyone know how I can return a value from a thread?

Dustin Davis wrote:
Okay, so if I have the following code function:

Function SaveFile(ByVal FileName As String) As Boolean
' Save the file as FileName
Return True
End Function

Can I call this function with a Thread, or do I need to rewrite it somehow?

Chris wrote:
Dustin Davis wrote:
I'm doing image conversion in my application and it seems to take
some time on some tasks. I'd like to show a "Converting..." type
message in a dialog box or splash screen of sorts.

The problem is that when I call ShowDialog() the app waits for the
dialog to close before it continues to process. Is there a way to
show the dialog while doing the conversions and close it when it's
done without using threads? Truth is, I don't want to deal with
threading if possible :)


You can use the Application.DoEvents() routine to let the OS free up
the time to do the redrawing of the window. But this will slow down
your processing. Really should do it in threads.

Chris

May 1 '06 #4

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

Similar topics

0
by: Mark English | last post by:
Every once in a while since I moved to Python 2.4 I've been seeing the following exception in threading.py Condition: File "mctest3.py", line 1598, in WaitForMessages...
3
by: Kannan | last post by:
Hello, I have a requirement that specifies that I display a "Please Wait..." window (preferably modal) along with a gif that mimics a progress bar during a save operation. The dialog needs to be...
3
by: Matt C. | last post by:
This is my first attempt at writing a .NET service, and also my first attempt at using threads. I don't know what I'm doing. Below is some simplified code from my service class (inheriting from...
5
by: Jim W | last post by:
I have an ASP.NET app that has very slow connect times using TCPClient, or the Socket class, or even calling a COM object that uses C socket calls on certain similar XP SP2 boxes. On those...
5
by: PontiMax | last post by:
Hi, when I press the OK button of my dialog box a long-running task is initiated. Therefore I would like to make visible a div section right after clicking the button where a user-friendly...
18
by: Coder | last post by:
Howdy everybody! How do I do the following... while (myVary != true){}; Obviously I do not want to use 100% of the processor to stay in this infinite loop till myVar == true. But wait do I...
2
by: Grant Edwards | last post by:
I'm having problems calling the Popen4 object wait() method from a thread. The folloing program produces an error on some machines (but seems to work on others) ...
5
by: Deepak | last post by:
I am programing a ping application which pings various centers . I used timer loop and it pings one by one. Now when i finish pinging one center it should wait for the ping_completed function to...
6
by: kdikert | last post by:
I have a worker thread, and when the worker is done I want it to show a popup dialog. The sample application below demonstrates this. There are two buttons: a "Show dialog" button which immediately...
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
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
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
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.