The .NET PictureBox and animated GIFs
I know the the .NET PictureBox can load GIF's, but can it load and display animated GIF?
Yes. Here's a sample (along with an image):
Option Strict On Option Explicit On
Imports System Imports System.Windows.Forms Imports System.Drawing
Public Class Form1 Inherits Form
Public Sub New() Me.Text = "Animated Gif Test" Me.Size = New Size(300,300)
Dim pb As PictureBox = New PictureBox() pb.Size = New Size(250,250) pb.Location = New Point(0,0) pb.Image = New Bitmap("pic1.gif")
Me.Controls.Add(pb) End Sub
<STAThread()> _ Shared Sub Main() Application.Run(New Form1()) End Sub End Class
|
© Copyright 2002 Patrick Steele.
Last update: 8/5/2002; 10:18:18 PM.
|
|