1

I am aware that the image property of a button in vb.net reads a .GIF format and thus animating at run time. I have a custom-made button with also a custom-made image property but unfortunately, it does not read a .GIF format. I have this code snippet:

    Private _Image As Image
<Category("Appearance CButton"), _
Description("Get or Set the small Image next to text")> _
<DefaultValue(GetType(Image), "none")> _
Public Property Image() As Image
    Get
        Return _Image
    End Get
    Set(ByVal Value As Image)
        _Image = Value
        Invalidate()
    End Set
End Property

This code reads the gif file as picture only and not as a gif. Now, does anyone here knows what is the problem with the code? Or is it possible to just inherit the image property of a windows form button so it can read a gif format? badly need.. thanks!

ABCDE
  • 131
  • 3
  • 6
  • 15

1 Answers1

0

please look here, putting in a picturebox and handling the click event could answer your question.

How do you show animated GIFs on a Windows Form (c#)

Community
  • 1
  • 1
Twiebie
  • 412
  • 1
  • 7
  • 16