Hi,

does anyone have an example sourcecode, how to load and use a gif animation ?
And transparent gif ?

Greetings,
Nordwind64
Posted on 2003-03-10 11:15:54 by Nordwind64
Hi again,

isn't it possible to load and show gif-anims with assembler ?

Greetings,
Nordwind64
Posted on 2003-03-11 13:03:08 by Nordwind64
Maybe this helps... it loads a animated gif only with the use of API.
In fact, it opens the gif file, extracts each frame and displays it with a loop.
Should be easy to translate: http://www.mvps.org/vbnet/index.html?code/bitmap/loadgif.htm
Posted on 2003-03-11 13:08:03 by bazik
Thanks bazik !

VB ?h ?
Not my favorite language... but I will try.

Greetings,
Nordwind64
Posted on 2003-03-11 14:25:28 by Nordwind64
Another way to do it is to use a Web Browser control. Here's a sample program I just modified. This was originally coded by xtreme... Try passing the different window handle aside from the main window handle when using the CreateWebBrowser function. :)

tested on win2k only. I believe you need IE installed (or the necessary dll's).


p.s. and btw, thanks to ThoughtCriminal, I'm using his avatar as an example. :tongue:




here's the part I modified
invoke GetAppPath, addr szDefaultResURL

invoke szCatStr, addr szDefaultResURL, addr imagefile
this code will trigger the loading of the gif
coinvoke _pWebBrowserOC,IWebBrowser,Navigate,addr bstrURL, addr vtEmpty, ...
I also modified a small part of Browser.inc
Posted on 2003-03-12 12:30:04 by arkane
Hi arkane,

thank you very much !
The code works fine. But is it possible to deactivate the right mousebutton in the control ?
Can I suppress the menue ?

Thanks
Nordwind64
Posted on 2003-03-13 10:00:51 by Nordwind64
GPF on NT 4.0
Posted on 2003-03-13 10:38:47 by The Svin
I don't have NT 4 but here's another jab... also disabling right click is implemented, check the ShowContextMenu method. :)
Posted on 2003-03-13 11:33:32 by arkane
Again GPF.
Posted on 2003-03-13 11:45:38 by The Svin
can you trace it in a debugger and tell me which part of the code causes the GPF? I don't have access to an NT4 system. The code works fine on 2k and 98 ... I don't know about 95 and XP.

Thanks.
Posted on 2003-03-13 11:59:29 by arkane
Somewhere in
004011E2 |. FF52 2C CALL DWORD PTR DS: ; shdocvw.70945217
Posted on 2003-03-13 12:19:43 by The Svin
ahh!! the coinvoke call
coinvoke _pWebBrowserOC,IWebBrowser,Navigate,addr bstrURL, addr vtEmpty, ...
I'll see what I can do. Thanks...
Posted on 2003-03-13 12:26:32 by arkane
Hi again,

thanks, works fine with XP !
What is GPF ? An error ?

Greetings,
Nordwind64
Posted on 2003-03-13 13:18:51 by Nordwind64
GeneralProtectionFault
Posted on 2003-03-13 13:43:50 by The Svin
Thanks !
Posted on 2003-03-13 14:38:19 by Nordwind64
This is the best I could come up. I have a hunch this will give you a GPF but here's my last try. If you can make it work on NT 4, good for you. If not, I'm sorry! :)

I removed the scollbars on this one...
Posted on 2003-03-13 15:08:08 by arkane

This is the best I could come up. I have a hunch this will give you a GPF but here's my last try. If you can make it work on NT 4, good for you. If not, I'm sorry! :)

I removed the scollbars on this one...


It works now.
Well done.
Posted on 2003-03-13 15:26:16 by The Svin
:-)))))))
Posted on 2003-03-13 15:47:37 by Nordwind64
Hi again,

I played with the great source, but...
...is it possible to remove the control border and/or make the gif transparent ?

Thanks,
Nordwind64
Posted on 2003-03-25 17:35:48 by Nordwind64
you mean like this? :)


p.s. I kinda "cheated" on it, but I have no idea other than this. :grin:
Posted on 2003-03-26 00:45:54 by arkane