|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
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 :) Dustin Davis wrote:
> I'm doing image conversion in my application and it seems to take some You can use the Application.DoEvents() routine to let the OS free up the > 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 :) 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? Chris wrote: Show quoteHide quote > 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 Anyone know how I can return a value from a thread?
Dustin Davis wrote: Show quoteHide quote > 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 |
|||||||||||||||||||||||