Show gif while form is "thinking"

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."
 
J

Jonathan Blitz

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."
 
D

Douglas J. Steele

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
 
J

Jonathan Blitz

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."
 
J

Jonathan Blitz

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."
 
J

Jonathan Blitz

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."
 
D

Douglas J. Steele

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"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Thought you should see this 1
Hiding an empty value 4
Weird message 5
Leave button pushed in 2
Renaming controls en-mass 1
Problems with OrderBy 3
Hding menu bar 2
Weird message on form 1

Top