By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,152 Members | 1,402 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,152 IT Pros & Developers. It's quick & easy.

Multithreading in GUI application

P: n/a
Hi, all!
I'm going to write GUI application with server side. Queries to server
should run in particular thread and GUI should stop its work until the query
finishes. But refresh of GUI main form should be performed during query
time. Does anybody know how to do this?

Best Regards
May 18 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
And what the problem is? Use Begin.Invoke to notify you UI worker thread
about events in other threads.

I'd recomend to create separate class, simulating InProcess Async calls,
smth like here
http://www.codeproject.com/csharp/in...rvicesincs.asp and use in to
interact with your server logic.
Hi, all!
I'm going to write GUI application with server side. Queries to server
should run in particular thread and GUI should stop its work until the query
finishes. But refresh of GUI main form should be performed during query
time. Does anybody know how to do this?


--
WBR,
Michael Nemtsev :: blog: http://spaces.msn.com/laflour

"At times one remains faithful to a cause only because its opponents do not
cease to be insipid." (c) Friedrich Nietzsche

May 18 '06 #2

P: n/a
>I'm going to write GUI application with server side. Queries to server
hould run in particular thread and GUI should stop its work until the query
inishes That part is confusing to me. Why have the gui responsive if it should not
be doing any work?

--

________________________
Warm regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
Professional VSTO.NET - Wrox/Wiley
The O.W.C. Black Book with .NET
www.lulu.com/owc, Amazon
Blog: http://www.msmvps.com/blogs/alvin
-------------------------------------------------------

"Aleksey" <al************@il.quest.com> wrote in message
news:ek**************@TK2MSFTNGP02.phx.gbl... Hi, all!
I'm going to write GUI application with server side. Queries to server
should run in particular thread and GUI should stop its work until the
query
finishes. But refresh of GUI main form should be performed during query
time. Does anybody know how to do this?

Best Regards

May 18 '06 #3

P: n/a
at least GUI should be responsive so OS won;t mark it with [Not
responding] flag. When I see such title I know there is something wrong
with application and I suppose you guys too ;))

the other reason is that you could give some respond on progress

I hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 18 '06 #4

P: n/a
<"Alvin Bruney" <www.lulu.com/owc>> wrote:
I'm going to write GUI application with server side. Queries to server
hould run in particular thread and GUI should stop its work until the query
inishes

That part is confusing to me. Why have the gui responsive if it should not
be doing any work?


So that:

a) The window can be resized
b) The window can be moved
c) The app could be closed
d) The app can repaint itself if a window is moved over it

Having a responsive UI which doesn't allow any UI-specific
functionality (i.e. none of the extra buttons are enabled etc) is
common and *much* better than having an unresponsive UI.

--
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
May 21 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.