jaxrpc
asked on
Animated Gif in Vb.net form
Hi, i am trying to make a monitoring screen to monitor some machines and i am intending to animate the machines when they are in operation and stop animating when they are not in operation. Can i add animated gif to vb.net form and switch between animated gif and non animated gif depending on situations? Or there are better ways of doing this, not necessary using animated gif, all methods are welcome. thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Building directly on jjardine’s idea:
You could have two picture boxes on your form, each the same size and in the same location. One picture box has it’s image property set to a static non moving image and the other set to the moving gif image.
Then have a procedure that flips the visible property depending on if you want the animated image showing or the static one.
Public property AnimationVisible() as Boolean
Get()
Return picAnimated.visible
End Get
Set(value as Boolean)
picAnimated.visible = value
picUnAnimated.visible = not value
End set
End property
(sorry if the VB syntax is a bit off)
You could have two picture boxes on your form, each the same size and in the same location. One picture box has it’s image property set to a static non moving image and the other set to the moving gif image.
Then have a procedure that flips the visible property depending on if you want the animated image showing or the static one.
Public property AnimationVisible() as Boolean
Get()
Return picAnimated.visible
End Get
Set(value as Boolean)
picAnimated.visible = value
picUnAnimated.visible = not value
End set
End property
(sorry if the VB syntax is a bit off)
Have you looked at the ImageAnimator Class in Visual Studio .Net?
Fernando