Thanx a lot for the answer. I gonna have a look (for now unfortunately, i
can't find the "Single Threaded Application With Long Running Calculation
Sample" in my SDK WPF sample directory, even in the last version of the SDK
i've just downloaded... is it not supposed to be found there ?).
Just a first comment anyhow. It seems everything it's done to keep the UI
responsive as if it was the "standart" requirement. But IMHO, in mots cases,
at least very often (at least in MY case : ) ), we just want our UI not to
response ! We don't want it to freeze (i mean not refresh) but we don't want
the user to be able to run another task either. Precisely because we don't
do a multitask application and/or because the result of the long running
calculation is crucial.
My impression is taht it's just a way to make things more difficult witouht
any good reason. But I'm probably missing something.
Patrice
"Douglas Stockwell" <doug@remove.11011.net> a écrit dans le message de news:
FA76C881-0D3D-45BD-A7F6-B99610ED638F@microsoft.com...
> In general, if you have a long running task on the UI thread, and you wish
> to have a responsive UI you will need to restructure your task.
>
> See this section in the documentation for details:
> http://windowssdk.msdn.microsoft.com...70(VS.80).aspx
>
> There are a few samples there. The "A Single Threaded Application with a
> Long Running Calculation" sample demonstrates how to avoid using a
> seperate thread by breaking a long running task up into more managable
> chunks and running those in the idle time of the UI thread.
>
> - Doug
>
> "Pon" <pongla.public@laposte.net> wrote in message
> news:1161512533.312762.5430@i3g2000cwc.googlegroups.com...
>> Hi everybody,
>>
>> I'm trying to basically use a progressbar on my UI.
>> I dosen't work as I expected as the progressbar doesn't refresh while
>> my process is running but only when it finishes.
>> I road (in this post
>> http://groups.google.fr/group/micros...85317f465db3f3)
>> that I have to update my progressbar in a different thread.
>>
>> This post is quiet old and I can't believe that (even if I understand
>> it technically). Do I really have to create a thread just to make the
>> pregressebar control usefull, really ???
>>
>> Thanx in advance
>>
>