Multithreading in GUI application

  • Thread starter Thread starter Aleksey
  • Start date Start date
A

Aleksey

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
 
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/inprocessasynservicesincs.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
 
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
-------------------------------------------------------
 
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
 
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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top