May 10 2020 08:06 AM
Can I add an animated GIF to my Microsoft Access database and if so how?? Thanks
May 10 2020 09:05 AM - edited May 10 2020 09:07 AM
@Grumpy2305 Sometimes the answer to a question is "Sure, why not?" But a better question might be "WHY?"
Where would you put this GIF? In a form? That's the logical place I guess. See if the image control will support the animated GIF format. I know you can insert GIFs into the image control.
The reason I question the reason is that Access tends to be oriented more towards business/work and less towards the kind of thing that I'd expect to see animated GIFs in. But I am curious how this would enhance the relational database application.
May 10 2020 12:21 PM
@George HepworthWhy not! I use my database for a business use and have been trying to enhance the look whilst in lockdown. Why not have an animated hourglass or scroll bar whilst waiting for something to happen like all apps and programs?
May 10 2020 01:04 PM
@Grumpy2305 In the 25 plus years I spent as a consultant designing and building relational database applications with MS Access and MS SQL Server, I can't recall a client ever asking to put animated GIFs on forms they use in their business.
That said, you've refined the requirement to be a GIF that mimics the functionality of a progress bar or the Hourglass or "whirling circle" that means "Please wait while I finish this". In that context, I guess it would be useful.
Since you can load a GIF into an image control, though, I suspect you can do it with one that is animated. The problem then would be to show it only when appropriate. That could done in the event that launches your long-running procedure.
May 10 2020 03:07 PM - edited May 10 2020 03:10 PM
@George Hepworth Sorry. I misspoke, to make the animated GIF move, you'll need to insert it into a Web Browser control on the form. In the standard image control, it would be static.
May 11 2020 04:29 AM
@George HepworthMany thanks for your responses and advice, very usefull.
May 12 2020 07:39 AM
@Grumpy2305 I decided, once I'd had a chance to understand this better, that I needed to implement a demo accdb to illustrate one possible approach to doing this. Scroll down to the link for the Animated GIF demo.
THANK YOU.
May 14 2020 02:25 AM
@George HepworthThats cool, many thanks. Love the bars changing colour on the splash screen and the wait GIF. Many thanks for your help...
May 14 2020 06:05 AM
@Grumpy2305 You're welcome and again, thank you. You challenged me to think instead of just reacting.
Continued success with the project.
May 15 2020 04:30 AM
@Grumpy2305 Lebans has created a GIF player some years ago : https://www.lebans.com/animatedgifplayer.htm
Besides that you can take a look at my article : https://www.experts-exchange.com/articles/33716/Defeating-the-device-independent-bitmap-dib-format.h...
If you examine the code you will see that at some time i use a collection to store the images..so you could extend the code to handle the images per frame and play them via a timer event
It won't be .gif (haven't test it) but you could gather e.g a couple of hundred frames and playback them..depending of the quality you want you could go as up /or as low...
1 second animation should be smooth at around 15fps so with 150 images you could have a 10 second animation
For now the code is 32bit only but i have made some tests and possible i will offer a 64bit version in the near future