473,830 Members | 2,055 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Long activity indicator control

Hi

I have a winforms application developed in c# v1.1.
The application has a form that calls a webservice method. The call is
performed from inside the GUI thread and may take up to a minute.
Meanwhile, I want to provide to the user some sort of visual indicator
indicating that the application is not frozen.
The call to the WS should remain on the GUI thread, as I don't want
the user to manipulate other visual controls while the call is in
effect.
I don't need to display a progress bar, just some sort of a dynamic
image like this:
https://marketplace.slizone.com/SliM...es/loading.gif
or another user control that plays some dynamic content.
Any idea how to perform this?
Thanks.

Nov 12 '07
10 5300
Don't you get frustrated when windows freeze on the screen, won't
respond to anything and display 'Not Responding'.

In programming, it is actually the 1% that involves most of the work.
>
On 12 Noi, 17:25, "Jon Skeet [C# MVP]" <sk...@pobox.co mwrote:
On Nov 12, 3:22 pm, nano2k <adrian.rot...@ ikonsoft.rowrot e:
I have a winforms application developed in c# v1.1.
The application has a form that calls a webservice method. The
call
is
performed from inside the GUI thread and may take up to a minute.
Doing that on a GUI thread is not a good idea.
Meanwhile, I want to provide to the user some sort of visual
indicator
indicating that the application is not frozen.
The call to the WS should remain on the GUI thread, as I don't
want
the user to manipulate other visual controls while the call is in
effect.
Then disable those controls while the operation is in progress. You
shouldn't make a long-running call on the UI thread.
I don't need to display a progress bar, just some sort of a
dynamic
image like
this:https://marketplace.slizone.com/SliM...es/loading.gif
or another user control that plays some dynamic content.
Any idea how to perform this?
I would seriously look at disabling all controls on the UI thread,
and
then making the call elsewhere, updating the UI with a progress
indicator (of any kind, whether that's an image or not)
appropriately.

I know it's a pain, but locking up the UI thread for a minute is a
really bad idea.

Jon

Hi
Thanks
Why is it such a bad idea? The only bad side I see is that the GUI
won't get painted while the call is in progress.
Actually, in 99% of the times, the call will not take more than a
second (it only authenticates the user), but, say, when the WS is
offline, the call will take long enough until the exception pops up,
so the call deserves some sort of visual signal to the user.
Isn't there a method of forcing a portion of the GUI to update from
another thread?
Tried this from another thread (using Invoke(), of course), but no
luck.

Thanks again.
Nov 12 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
4980
by: Peter Kwan | last post by:
Hi, I believe I have discovered a bug in Python 2.3. Could anyone suggest a get around? When I tested my existing Python code with the newly released Python 2.3, I get the following warning: FutureWarning: hex/oct constants > sys.maxint will return positive values in Python 2.4 and up It is because I used some constants such as 0x80ff3366, so I change it to 0x80ff3366L, hoping to get rid of the warning.
2
1629
by: SMike | last post by:
I post this message again as I didn't get an answer back. I would appriciate any ideas. I am getting the following error when sending a https request after a long period with no activity. Cannot access a disposed object named "System.Net.TlsStream". After that everything sems to be fine untill the next long idle period. The code is below.
2
3034
by: Steve | last post by:
I have found an Activity Bar control which looks to be exactly what I need for my splash screen, but I can't seem to get it working. When I initialise the Start method, the application bar works great until I do any other processing, which is when it freezes! There is no documentation with the control which I downloaded from: http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=7B0E2EAB-42C4-47AA-9292-731052946BD5 I...
1
6033
by: Anonieko | last post by:
Query: How to display progress bar for long running page Answer: Yet another solution. REFERENCE: http://www.eggheadcafe.com/articles/20050108.asp My only regret is that when click the browser back button, it loads the progress bar again. Any solution to this?
9
3957
by: luke | last post by:
Hi everybody, please, can someone explain me this behaviour. I have the following piece of code: long long ll; unsigned int i = 2; ll = -1 * i; printf("%lld\n", ll);
1
2228
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is it possible to implement it using some other control, for example a floating window? A link to example would also be useful. Thanks, Marko Vuksanovic.
6
10108
by: Marko Vuksanovic | last post by:
I am trying to implement a file upload progress indicator (doesn't have to be a progress bar) using atlas... I do realize that the indicator cannot be implemented using Update panel control, but is it possible to implement it using some other control, for example a floating window?
1
2144
by: Marko Vuksanovic | last post by:
I used the following code for implementing a file upload progress indicator, using UpdateProgress Panel, though I have a problem that FileUpload.Has File always returns false. Any suggestions what might be wrong? FileUpload2.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="FileUpload2.aspx.cs" Inherits="FileUpload2" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
9
3276
by: esakal | last post by:
Hello, I'm programming an application based on CAB infrastructure in the client side (c# .net 2005) Since my application must be sequencally, i wrote all the code in the UI thread. my problem occurs when i try to show a progress bar. The screen freezes. I know i'm not the first one to ask about it. but i'm looking
0
9780
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9641
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10769
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10476
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10196
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9310
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5775
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3956
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3070
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.