- Use DesktopHTMLViewer
- Create a separate HTML file. Mine is Image may be NSFW.
Clik here to view. - Right click on your desktop target in the IDE. Add a Copy Files script. Drag in both your HTML file and your gif. Set the destination to Resources.
- Run this code in the DesktopHTMLViewer Opening event
Var file As FolderItem = SpecialFolder.Resource("mac_icon.html")
If Not file.Exists Then
MessageBox "HTML not found"
Return
End If
Me.LoadPage(file)
NOTES
(After spending longer than this should have taken…)
- Loading the gif file path directly into DesktopHTMLViewer.LoadURL doesn’t appear to work
- Creating the same HTML in code and using Me.LoadPage(htmlContent, resourceFolder) doesn’t seem to work on Windows. The HTML works but it doesn’t locate the gif correctly. Works fine on Mac.
- Others have suggested loading and displaying each frame of the gif
Tested Xojo 2024 r2.1 on an Intel Mac and Windows 10 in Parallels
2 posts - 2 participants