Using the code below the animated GIF plays fine, but animated PNG or WEBP only displays the first frame.
Code: Select all
URL = [PATH TO IMAGE]\731_128.gif
Gui Add, ActiveX, xm w128 h128 vWB, Shell.Explorer
wb.navigate("about:<meta charset='utf-8'><meta http-equiv='X-UA-Compatible' content='IE=Edge'>")
while (wb.readyState != 4 || wb.busy)
Sleep -1
wb.document.body.innerHTML := "<style> * { border: 0; margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; } </style><img src='" url "'>"
Gui Show
If I take that same IE or Chrome window and set its parent to my AHK GUI it will embed the browser tab in the AHK GUI and the image still plays just fine - but then I have the whole browser in there and I really only want the animated image.
I guess I'm not sure why its different by loading it as an ActiveX control - I would think it would use the same method to render the image as it does by dragging the file into an open IE/Edge window does - but it doesn't seem to.
I was wondering if anyone could explain why its different or know how it may work? Attached some sample images i used for testing.