[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Working indicators not animating

Posted on 2009-07-08
5
Medium Priority
?
642 Views
Last Modified: 2012-05-07
Hi experts!
I have an issue with working indicators, using: (Either)
RadWaitingBar, SpinningProgress (Excellent), an animated gif, or even a simple seconds counter. (Label)
Any of these elements are to be shown on a tiny borderless form as a visual clue of the application running.
The problem I have is that none of them (Using one at a time, of course) animates when the form is shown, they appear static, not moving as they are intended to.
The time for the process to complete varies according to the user input.
Please help.
Thanks in advance.
This is the method I'm using.

Private Sub cmdMake_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdMake.Click
        Try
            fm.Show()   'class-level form previously declared which contains the indicator.
            Application.DoEvents()
                    'Does what the app does.
            Catch ex As Exception
        Finally
            fm.Close()
        End Try
    End Sub

Open in new window

0
Comment
Question by:jorgemgonzalez
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 13

Expert Comment

by:kaylanreilor
ID: 24811378
Perhaps you should call the Activate() method first. But also I'm not sure to understand what is the type of fm : shouldn't you use a PictureBox for example to host the animated gif ?
0
 
LVL 5

Assisted Solution

by:Pablissimo
Pablissimo earned 600 total points
ID: 24812733
Does your long process contain regular calls to Application.DoEvents?
0
 
LVL 86

Accepted Solution

by:
Mike Tomlinson earned 1400 total points
ID: 24815044
I think Pablissimo is on the right track.  Your "working indicators" are not animating because the UI thread is "stuck" in your heavy processing loop.

Either:

(1) Place a call to Application.DoEvents() INSIDE your processing loops.
(2) Utilize manually created threads and use delegate/invokes to update the form when necessary.
(2) Use the built-in BackgroundWorker() component and the Progess and/or Completed events.
0
 

Author Closing Comment

by:jorgemgonzalez
ID: 31601439
Thank you for pointing me to the right direction.
0
 

Author Comment

by:jorgemgonzalez
ID: 24816832
Thank you experts for the fast reply. That did it, problem solved!!! ;-)
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question