Solved

Playing animated GIF while populating Treeview.  Please Help!

Posted on 2004-04-28
2
736 Views
Last Modified: 2013-12-25
I am populating a Treeview in a program and it takes a long time.  I want to play a .GIF animation while it is loading.  I have the GIF loaded into a WebBrowser.  I can only get the first frame of the animation to play while the loop is running to fill the Treeview.  The animation will play after the Treeview is filled.  How do I run the loop AND have the animation play at the same time?

I am using VB 6.0 sp5.  Let me know if you need any other info!

Thanks!!
0
Comment
Question by:jtminton
[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
2 Comments
 
LVL 9

Accepted Solution

by:
p_sie earned 500 total points
ID: 10940139
Did you place DoEvents in the procedure where you are filling the Treeview?

Example

For i = 1 to 1000
    Tree.nodes.add ....
    DoEvents
Next

Doevents will let other processes get processor time!
0
 

Author Comment

by:jtminton
ID: 10942238
Thanks, I should have known that!  It worked, but it made my tree load 2.5 times slower.  Oh well.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

738 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