异步处理? [英] Async processing?
问题描述
你好,
我对.NET的这方面有点新意,所以请原谅我,如果那是常见问题。
我有一个Windows窗体,当用户单击按钮时必须执行冗长的操作。
当操作正在进行时,用户将无法从UI执行任何其他操作但我仍然希望UI抽取消息(因此可以移动等等)
在C#中实现它的最佳方法是什么?
谢谢。
祝福,
亚历克斯。
-
地址邮箱用户响应在域名alexoren后缀为com
Alex< in ****** @ online.nospam>写道:我对.NET的这方面有点新意,所以请原谅我,如果那是常见问题。
我有一个Windows表格必须执行当用户点击按钮时,操作很长。
当操作正在进行时,用户将无法从UI做任何其他操作,但我仍然希望用户界面输入消息
(所以可以移动等等)
在C#中实现它的最佳方法是什么?
参见 http://www.pobox.com/~skeet/csharp/threads
,特别是
http://www.pobox.com/~skeet/csharp/t...winforms.shtml
-
Jon Skeet - < sk *** @ pobox.com>
http:// www .pobox.com / ~siget 博客: http://www.msmvps.com/jon.skeet
如果回复小组,请不要给我发邮件
Hello Jon Skeet [C#MVP],
你认为这会对他有所帮助;)
让我们玩得很高并建议他像这样阅读smth http://www.amazon.com /exec/obidos/AS...383773-8813403
:)
我有点像.NET的这方面的新手,请原谅我,如果这是一个FAQ。
J>请参阅 http://www.pobox.com/~skeet/csharp/threads
J>特别是
J> http://www.pobox.com/~skeet/ csharp / t ... winforms.shtml
---
WBR,
Michael Nemtsev ::博客: http://spaces.msn.com/members/laflour
有时一个人仍然忠实于一个事业只因为它的对手不会因为b $ b不再是平淡的。 (c)Friedrich Nietzsche
Michael Nemtsev< ne ***** @ msn.com>写道:你认为这有助于他;)
是的,我怀疑是这样。这肯定有很多其他人得到帮助
用线程处理。
让我们玩得很高并建议他像这样阅读smth
http://www.amazon.com/exec/ obidos / AS ... / qid%3D1127378
857 / sr%3D11-1 / ref%3Dsr%5F11%5F1 / 103-0383773-8813403
>
我不明白为什么 - 你不需要用书来学习线程。我肯定没有。
肯定没有。
如果OP有任何进一步的问题,他总是可以在这里问他们。
-
Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet
如果回复小组,请不要给我发邮件
Hello,
I am sort of new to this aspect of .NET so please forgive me if that''s a FAQ.
I have a Windows Form that has to perform a lengthy operation when the user clicks a button.
While the operation is in process, the user will not be able to do anything else from the UI but I still want the UI to pump messages (so it can be moved, etc.)
What is the best way to implement it in C#?
Thank you.
Best wishes,
Alex.
--
Address email to user "response" at domain "alexoren" with suffix "com"
Alex <in******@online.nospam> wrote:I am sort of new to this aspect of .NET so please forgive me if that''s a FAQ.
I have a Windows Form that has to perform a lengthy operation when the user clicks a button.
While the operation is in process, the user will not be able to do
anything else from the UI but I still want the UI to pump messages
(so it can be moved, etc.)
What is the best way to implement it in C#?
See http://www.pobox.com/~skeet/csharp/threads
and particularly
http://www.pobox.com/~skeet/csharp/t...winforms.shtml
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Hello Jon Skeet [C# MVP],
Do u think it helps him ;)
Let''s play high and suggest him to read smth like this http://www.amazon.com/exec/obidos/AS...383773-8813403
:)
I am sort of new to this aspect of .NET so please forgive me if
that''s a FAQ.
J> See http://www.pobox.com/~skeet/csharp/threads
J> and particularly
J> http://www.pobox.com/~skeet/csharp/t...winforms.shtml
---
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/members/laflour
"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche
Michael Nemtsev <ne*****@msn.com> wrote:Do u think it helps him ;)
Yes, I suspect so. It''s certainly helped plenty of other people get to
grips with threading.
Let''s play high and suggest him to read smth like this
http://www.amazon.com/exec/obidos/AS.../qid%3D1127378
857/sr%3D11-1/ref%3Dsr%5F11%5F1/103-0383773-8813403
I don''t see why - you don''t need to use a book to learn threading. I
certainly didn''t.
If the OP has any further questions, he can always ask them here.
--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
这篇关于异步处理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!