473,473 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Multithreading in GUI application

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
4 1782
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
>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
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
<"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
9
by: Popoxinhxan | last post by:
Dear experts, i want to develop an client application that consume the google search web service. In my MainForm i have a method to retrieve all the search result e.g. GetGoogleResults(). Now i...
9
by: tommy | last post by:
hi, i have found a example for multithreading and asp.net http://www.fawcette.com/vsm/2002_11/magazine/features/chester/ i want to speed up my website ... if my website is starting, they...
2
by: Rich | last post by:
Hello, I have set up a multithreading routine in a Test VB.net proj, and it appears to be working OK in debug mode and I am not using synchronization. Multithreading is a new thing for me, and...
55
by: Sam | last post by:
Hi, I have a serious issue using multithreading. A sample application showing my issue can be downloaded here: http://graphicsxp.free.fr/WindowsApplication11.zip The problem is that I need to...
4
by: boo73uk | last post by:
Hi All, I'm going to rewrite a VB6 app to VB.net and I need some pointers. Basically this app spawns simultaneous,multiple, independant ActiveX.exe 'workers' which query a SQL Server database and...
4
by: Michael | last post by:
Hi, I am trying to create a multithreaded VB 2005 application which attempts to create a new thread per Domain Controller (DC) in my environment. Each thread connects to its allocated DC and...
2
by: Pradnya Patil | last post by:
hi , I am trying to draw ' html div-tag ' on the screen which will resemble a rectangle through vb.net code. I want it to be drawn faster...so I introduced multithreading using Threadpool. I...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.