Show gif while form is "thinking"

  • Thread starter Thread starter Jonathan Blitz
  • Start date Start date
J

Jonathan Blitz

Is there any way to display a gif file of my own choosing when the code
behind a form is busy or am I limited to the hourglass?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Didn't work though it was not so clear how to use that code so I way have
got it wrong.

Any examples of actual use?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Copy all of the code in the shaded box to a new module, and save the module,
making sure you don't name the module the same as any of the routines in it.

To set the mouse cursor to a specific Icon file, you use

PointM strIconPath

or

Call PointM(strIconPath)

(where strIconPath contains the complete path to the .ico file)

To set it back to normal, you can use

Screen.MousePointer = 0
 
To see it work do I have to have Access busy running some code or is it
enopugh to step though the code in the debugger?
In other words, does it change the current icon displayed or the "busy"
icon?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
I finally managed to do it.
But no good - I just get an empty cursor. No gif is displayed. :(

Any ideas?

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
Many thanks for your answer.
Only problem is that there is no indication of how to use the code.

--
Jonathan Blitz
AnyKey Limited
Israel

"When things seem bad
Don't worry and shout
Just count up the times
Things have worked themselves out."
 
I would have expected that at least one of the downloads would have had an
example of how to use it. (I've never seen a reason to include an animated
gif, so I've never bothered to look at Stephen's code)

Here's something Stephen posted a while back about alternative methods:

"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.
Update coming soon..it's my next project.(I've been saying this for 6
months now!)
http://www.lebans.com/animatedgifplayer.htm"
 
Back
Top