Wait while processing dialog boxes (threading?)

  • Thread starter Thread starter Dustin Davis
  • Start date Start date
D

Dustin Davis

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 :)
 
Dustin said:
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
 
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?
 
Back
Top