Animated GIF on Form

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Hello:

Does anyone know if I can put an animated GIF onto a
Form?

For instance, I'd like to place a "blinking" 'NEW' icon
onto a form that can be made visible depending on the
record data.

Thanks,
Tom
 
I don't think Access can show an animated GIF. It will probably just show
the first image. You can get the same effect by using the time interval
property. Just have it switch the visibility.

image.Visible = not(image.visible)

Kelvin Lu
 
Kelvin:

Thanks, I appreciate the feedback.

I don't know as to how and where I set the time interval. Could you
please provide me more pointers?

Thanks so much,
Tom
 
Tom said:
Hello:

Does anyone know if I can put an animated GIF onto a
Form?

For instance, I'd like to place a "blinking" 'NEW' icon
onto a form that can be made visible depending on the
record data.

Thanks,
Tom


You will find the solution to this at www.lebans.com.

hth

Hugh
 
The easiest method is to download a 3'rd party ActiveX control. For
performance reasons, it's written in ATL and multithreaded, I like and
have used this one.
http://skyscraper.fortunecity.com/capacity/402/activex.html

For a listing of other controls have a look at:
http://www.generation.net/~hleboeuf/gif.htm

You can also use the MS Web Browser control. Check the currently
installed ActiveX controls on your system.

Finally, for those situations where you do not want to use an ActiveX
control or just want to play a single Animated Gif as part of a splash
screen there is code on my site to do this in native Access VBA. No 3'rd
party DLL's required. The code is a bit dated now and does not include
support for Local Color tables that my latest version in VB6 does.
http://www.lebans.com/animatedgifplayer.htm


--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
Stephen:

Thanks so much for your feedback... I did have a look at
your website and downloaded the files below:
- AnimatedGifCtlSource.zip
- AnimatedGifVB6Source.zip

I am not exactly sure as to how I should implement this
into my database. Maybe I overlooked something, but is
there an installation file so that I could run this
feature on every db now? Or do I need to implement
certain VBA code into a single db? If yes, which ones?

I hope you won't mind providing me more pointers? What
you have done is awesome... it's just that I can entirely
understand how to make it work on my machine as well.

Thanks so much!!!

Tom
 
Hugh:

Thanks for the feedback... I did check the info out at
Stephen's website. I wasn't entirely certain how to make
it work on mine though. I put my questions into
Stephen's message.


Thanks,
Tom
 
This will only cause an image to appear to blink by flashing on and off. If
you really want to use an animanted GIF follow the other suggestions. This
trick also has a flaw in that the blinking will only occur if nothing else
is happening (i.e. the database is idle). If you click and hold the mouse
button, the blinking stops or if you have a complex function that runs, the
blinking will stop until the form with the picture has the focus again. If
you still want to use it heres the trick.

In your form, create in image field with the picture you want. Size it and
put in where you want. Then under the properties tab of the form, the box
in the top left corner of the form, under the events tab, find Timer
Interval. Set this to the time you want to blink (in milliseconds). The
smaller the number the quicker the blinking. Then under On Timer click on
the elipses to the right of it to take you to the code page. Put in this
code:

Me.NameOfImage.Visible = not(Me.NameOfImage.Visible)

Change NameOfImage to the name you gave the image object. Close the windows
and view your form to see the blinking image.

Kelvin Lu
 
Kelvin:

This is perfect!!! This is exactly what I needed. At a
time rate of 500, it's working great.

Thanks so much for the information.

Tom
 
Back
Top