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!

Graphical animated buttons 1

Status
Not open for further replies.

monkey666

Programmer
Oct 18, 2002
34
EU
afternoon

I need to create "fancy" buttons for a client GUI (heavy on the G), that have a rollover effect - like in flash, e.g on mouseenter a the button graphic rotates through 360 degrees.

I've been considering a few options:

1 use Videoframe class from the VFP samples classes as the button and play a 1 second video clip (as the button)

2 use an animated Gif as the button, any ideas how to display the animation VFP 7 since the standard image control doesn't animate. I thought of creating a mini, button sized-html document with the animated gif within it.

Any ideas?

monkey
 
monkey666

2 use an animated Gif as the button, any ideas how to display the animation VFP 7 since the standard image control doesn't animate. I thought of creating a mini, button sized-html document with the animated gif within it.

You can show an animated gif in VFP by using the Internet Browser Actitvex control, that you place on your form and in the init of your form use something like:
THISFORM.oIE.Navigate("c:\mygif.gif")

Note on faster computers you may need to slow down the animation, in order to show properly.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
morning

Thanks for that - i was intending to use the web browser control but didn't realise you could set the filename directly to a gif file (hence i was going to create an html document with the gif as imgsource).

I used the web browser control in VFP & VB with the gif as the filename and both returned an unspecified error of 0x8004005 before showing the animated gif. I then added & tried other web components and found the MS SCRIPTLET control (MSHTML.dll) to work really well, with the URL property set to the animated gif path.

monkey
 
monkey666,

I found your solution to be the best when I was trying to do this today (I'm adding a little eye candy to progress indication so user has something to look at when bar doesn't seem to be moving)...the only thing that I don't like is that GIF transparency is loss, but compared to the other solutions MARCHOSo_Ocx/Web Browser/Timer & Animated GIF Splitter just to name a few, using the MS SCRIPLET control is hands-down the winner in my book. This was the first time that I really wished I was using VFP 8, but that will come soon enough. Anyways, heres a star and my thanks.

Slighthaze = NULL
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top