TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dmitrij Solov
NA
43
6.5k
Animated gif-problem
Dec 2 2016 10:36 AM
Hello,
I want to create an animation, based on an animated gif image. In the following program I can view the Image, but not the Image animation.
I use .NET 4.0 Here is the code of the partial class:
using
System;
using
System.ComponentModel;
using
System.Drawing;
using
System.Drawing.Drawing2D;
using
System.Windows.Forms;
//animated image issue
namespace
DrawingBasicsAnimation
{
public
partial
class
Form1 : Form
{
public
Form1()
{
InitializeComponent();
}
private
void
FillRectangle1(
object
sender, PaintEventArgs e)
{
itsme =
new
Bitmap(@
"..\..\..\..\..\..\pics\agif1.gif"
);
ImageAnimator.Animate(itsme,
new
EventHandler(
this
.OnFrameChanged));
ImageAnimator.UpdateFrames();
e.Graphics.DrawImage(itsme,
new
PointF(0, 0));
}
private
void
OnFrameChanged(
object
o, EventArgs e)
{
this
.Invalidate();
}
private
Bitmap itsme;
}
}
What am I doing wrong?
Reply
Answers (
1
)
upload image from excel into database in winforms using c#
Unique Random number