[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1355
  • Last Modified:

Animated Gif Component in VB.Net

I am going from VB6 to VB.Net 2005.  In VB6 I had a component, "VB Animate Gif Control."

Is it possible to use this component in VB.Net?  If so, how would I do it?  If not, do you know how I can put in an animated gif into my program?
0
servodude
Asked:
servodude
  • 4
  • 3
  • 2
1 Solution
 
ericwong27Commented:
Just using the Picturebox control will do.
0
 
flavoCommented:
I think the standard controls do this by default now (ie Buttons and Image controls)

Dave
0
 
servodudeAuthor Commented:
Okay, I am very new to .Net.  I put my animated gif into a Picturebox.   But I don't see my animated gif when I run the program.  

I don't even see the animated gif in the Picturebox at design time.  Any suggestions?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
flavoCommented:
It shouldn't be animated at design time, but should be at run time.
0
 
servodudeAuthor Commented:
The problem is that I see nothing.  I don't see the gif animated or not-animated.  
0
 
ericwong27Commented:
> The problem is that I see nothing
Maybe your image too large, please change  SizeMode to AutoSize
0
 
ericwong27Commented:
or SizeMode = StretchImage
0
 
ericwong27Commented:
Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        PictureBox1.Image = Image.FromFile("C:\temp\Business058.gif")
        PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage

    End Sub


End Class
0
 
servodudeAuthor Commented:
Thank you.  It works very well.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now