M
Marcos Stefanakopolus
Ok, I'll admit it, I'm a winforms newbie. I'm writing an image processing
program that, by its nature, gets into some fairly lengthy processing
cycles. As long as I don't touch the UI while it's working, don't alt-tab
away and come back, don't minimize and restore--in short, as long as I sit
there like a dope waiting for the processing to be completed, things are
fine. My UI updates itself at the right times with progress bar updates,
updates to the PictureBox control that has the image in it, and even updates
to a RichTextBox that shows some debugging type output. But the second I do
anything at all (even just dragging the window around), the entire UI stops
showing any updates. If I bring some other app on top of mine and then
bring mine to the front, it doesn't re-draw at all, leaving me with an empty
white box where my UI should be. Obviously, this is irritating as heck
because frequently I'd like to be doing other things, like checking my
e-mail and stuff, while my program is working.
I realize that there is probably some general principle of writing winforms
apps so the UI stays responsive no matter what the rest of the app is doing,
but I'm cluless as to what it might be. Worse, being new to windows
programming in general (having finally taken the plunge out of the crusty
world of the command line app), I have no idea what I should be searching
for in the Visual Studio documentation.
Any hints, even just a pointer to the relevent docs, would be greatly
appreciated! Thanks.
program that, by its nature, gets into some fairly lengthy processing
cycles. As long as I don't touch the UI while it's working, don't alt-tab
away and come back, don't minimize and restore--in short, as long as I sit
there like a dope waiting for the processing to be completed, things are
fine. My UI updates itself at the right times with progress bar updates,
updates to the PictureBox control that has the image in it, and even updates
to a RichTextBox that shows some debugging type output. But the second I do
anything at all (even just dragging the window around), the entire UI stops
showing any updates. If I bring some other app on top of mine and then
bring mine to the front, it doesn't re-draw at all, leaving me with an empty
white box where my UI should be. Obviously, this is irritating as heck
because frequently I'd like to be doing other things, like checking my
e-mail and stuff, while my program is working.
I realize that there is probably some general principle of writing winforms
apps so the UI stays responsive no matter what the rest of the app is doing,
but I'm cluless as to what it might be. Worse, being new to windows
programming in general (having finally taken the plunge out of the crusty
world of the command line app), I have no idea what I should be searching
for in the Visual Studio documentation.
Any hints, even just a pointer to the relevent docs, would be greatly
appreciated! Thanks.