Click here to Skip to main content
15,917,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: Web based paint tool Pin
Dave Kreskowiak4-Mar-04 9:05
mveDave Kreskowiak4-Mar-04 9:05 
GeneralRe: Web based paint tool - WinForm Pin
AWebDude4-Mar-04 9:25
AWebDude4-Mar-04 9:25 
GeneralRe: Web based paint tool - WinForm Pin
Mazdak4-Mar-04 9:39
Mazdak4-Mar-04 9:39 
GeneralRe: Web based paint tool - WinForm Pin
Dave Kreskowiak4-Mar-04 10:24
mveDave Kreskowiak4-Mar-04 10:24 
GeneralRe: Web based paint tool - WinForm Pin
OmegaSupreme4-Mar-04 10:24
OmegaSupreme4-Mar-04 10:24 
GeneralRe: Web based paint tool Pin
Heath Stewart4-Mar-04 10:28
protectorHeath Stewart4-Mar-04 10:28 
GeneralRe: Web based paint tool Pin
partyganger4-Mar-04 20:54
partyganger4-Mar-04 20:54 
QuestionHow to deal with lengthy tasks Pin
hongheo764-Mar-04 7:52
hongheo764-Mar-04 7:52 
I have to write a small C# form-based program which parses thru a directory containing data files. For each data file, it takes some time to process.

The problem is that with a directory with many files, my program is like frozen. The program doesn't respond to any mouse clicks or keyboard input. Worse than that, if I click on other applications, and click back to my application, the form doesn't repaint & sometimes, it repaints but Windows says that "This application does not respond" on the title bar. If I just let my application run, it will surely complete after a while.

I tried to alleviate the situation by creating a modeless dialog with a Cancel button. Before I run my lengthy task, I opened this modeless dialog. If the user clicked on the Cancel button, I set a global boolean Cancel variable, which was checked at every iteration of the lengthy task.

To my surprise, the modeless dialog didnt receive any mouse clicks when the lengthy task was in progress. So, there was no way for me to terminate the lengthy operation when it's running.

I certainly need your advice on dealing with time-consuming tasks. I guess that I would have to break down this task into several parts, but don't know how to make them run back-to-back.

Thanks a lot for your help.
AnswerRe: How to deal with lengthy tasks Pin
Mazdak4-Mar-04 8:08
Mazdak4-Mar-04 8:08 
GeneralRe: How to deal with lengthy tasks Pin
Werdna4-Mar-04 8:39
Werdna4-Mar-04 8:39 
GeneralRe: How to deal with lengthy tasks Pin
Mazdak4-Mar-04 8:43
Mazdak4-Mar-04 8:43 
AnswerRe: How to deal with lengthy tasks Pin
Dave Kreskowiak4-Mar-04 8:10
mveDave Kreskowiak4-Mar-04 8:10 
AnswerRe: How to deal with lengthy tasks Pin
YetAnotherDeveloper4-Mar-04 10:22
YetAnotherDeveloper4-Mar-04 10:22 
AnswerRe: How to deal with lengthy tasks Pin
hongheo764-Mar-04 14:51
hongheo764-Mar-04 14:51 
GeneralRe: How to deal with lengthy tasks Pin
Uwe Keim5-Mar-04 5:49
sitebuilderUwe Keim5-Mar-04 5:49 
GeneralBalloon ToolTips Pin
Marco M.4-Mar-04 7:26
Marco M.4-Mar-04 7:26 
GeneralRe: Balloon ToolTips Pin
Mazdak4-Mar-04 7:36
Mazdak4-Mar-04 7:36 
GeneralRe: Balloon ToolTips Pin
Heath Stewart4-Mar-04 9:57
protectorHeath Stewart4-Mar-04 9:57 
GeneralCustom Control Designer not seeing Controls on init Pin
YetAnotherDeveloper4-Mar-04 7:22
YetAnotherDeveloper4-Mar-04 7:22 
GeneralRe: Custom Control Designer not seeing Controls on init Pin
YetAnotherDeveloper4-Mar-04 10:02
YetAnotherDeveloper4-Mar-04 10:02 
GeneralRe: Custom Control Designer not seeing Controls on init Pin
YetAnotherDeveloper4-Mar-04 19:19
YetAnotherDeveloper4-Mar-04 19:19 
GeneralProblem with marshal-by-reference class Pin
Flack4-Mar-04 7:12
Flack4-Mar-04 7:12 
GeneralRe: Problem with marshal-by-reference class Pin
turbochimp4-Mar-04 9:29
turbochimp4-Mar-04 9:29 
GeneralRe: Problem with marshal-by-reference class Pin
Roman Rodov4-Mar-04 18:49
Roman Rodov4-Mar-04 18:49 
GeneralCreating a short cut.... Pin
Anonymous4-Mar-04 5:46
Anonymous4-Mar-04 5:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.