Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Animation stops when reading db

Status
Not open for further replies.

Nunina

Programmer
Mar 5, 2003
128
PR
Hi!

I am using an animation in my app. I'm using the Animation GIF OLE control to animate the graph.

The animation plays great until the app goes to read the data from the db. It then stops until it's finished reading the data, when it starts playing again.

Is there a way around this? I tried the Internet Explorer trick for the graphs, but the background is always white and I can't get rid of the scroll bars. I found something about it in some forum, but it was too complicated and VB didn't like it.

Please help!

Thanks,
Nunina
 

There was a recent discussion about animated gifs in vb in the following thread222-568832. Let me point you to near the bottom of this thread where stongm has modified his code to use either the HTMLEdit or WebBrowser control to make the background of either control the same color as the controls container. I think that this is exactly what you are looking for.

The only other suggestion I can give you is to make your gif into an AVI and use the animation control to play it.

Good Luck

 
Thanks Jon, but I don't have a loop to read the database.

I just have one single query that bring the data I want.

Any ideas?
 
Your problem here is that VB is single-threaded.

This can be addressed, but isn't straightforward. Having said that, I'm sure we've overed the issue on several occasions; I know I have a solution, and I'm sure that I've shared it here in the past. Just do a keyword search on (I suspect) multithreading.
 
Here is one of those solutions mentioned that introduces multithreading (courtesy strongm)

thread711-446543, of course there will be others

Take Care

Matt
If at first you don't succeed, skydiving is not for you.
 
Read the data from the database? You mean fill a recordset with data?
Just use the adAsync option and a second thread will be created by ADO to get the remaining data, after the initial fetch size is complete. Then, even with thousands of records, control is returned to the app almost immediately (unless you are calling some method of the recordset after opening it, such as a MoveLast or RecordCount)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top