Visual Basic Classic
--
Questions
--
Followers
Top Experts
(no .Net!)
The image control in MS Forms only supports static gifs
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
(Sorry if it was ambigious)
the animation control will play animated gifs, avi's, etc.
i think the animation control is found in the Microsoft Windows Common Controls or Microsoft Windows Common Controls 2, i can't remember.
if thats not what you want can you be a little more specific with your requirements please.
Acquiesce






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
What I'm looking for is a solution to display ANY of the above in the same control, so I don't have to check for image type and use a different control in run-time.
Imagine, that the Image control can display an animated gif correctly. This is what I'm looking for, but not yet found.
(I'm working in VB6)
(The Webbrowser control is not bad idea, but
1. I couldn't remove it's border
2. it cannot display bmps
2) It displays bmp files, the problem is with file asossiation not webbrowser control.
Only if it is a GIF does it create more references to the Image() - but even then, it still uses the placement of the original Image control for duplication. And only if it is a GIF do you uses the other routines from that web link.
Just a suggestion ...

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Let me explain a bit AniGif code (actually, Randy's code based on my sample from FreeVBCode). At first, code checks if file has gif format by checking GIF signature. If it is, it load it - and works correctly with animated/nonanimated gifs. If it's not a gif file, it show a msgbox:
If Left$(fileHeader, 3) <> "GIF" Then
MsgBox "This file is not a *.gif file", vbCritical
Exit Function
End If
Just remove MsgBox and then in form code:
If LoadGif(FileName,Image1) Then 'try first gif
'my code to show gif
Else
Image1.Pictture = LoadPicture(FileName)
End If
Regards
Ark
I will leave a recommendation in the Cleanup topic area that this question is:
Accept PBuck's comment as answer.
Please leave any comments here within the next seven days.
PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
emoreau
EE Cleanup Volunteer
SpideyMod
Community Support Moderator @Experts Exchange






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
Visual Basic Classic
--
Questions
--
Followers
Top Experts
Visual Basic is Microsoft’s event-driven programming language and integrated development environment (IDE) for its Component Object Model (COM) programming model. It is relatively easy to learn and use because of its graphical development features and BASIC heritage. It has been replaced with VB.NET, and is very similar to VBA (Visual Basic for Applications), the programming language for the Microsoft Office product line.