Raises the FrameChanged event.
protected virtual void OnFrameChanged(
RasterPictureBoxFrameChangedEventArgs e
)
protected:
virtual void OnFrameChanged(
RasterPictureBoxFrameChangedEventArgs^ e
)
protected:
virtual void OnFrameChanged(
RasterPictureBoxFrameChangedEventArgs^ e
)
e
A RasterPictureBoxFrameChangedEventArgs that contains the event data.
Raising an event invokes the event handler through a delegate. The OnFrameChanged method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class. Notes to Inheritors: When overriding OnFrameChanged in a derived class, be sure to call the base class's OnFrameChanged method so that registered delegates receive the event.
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Drawing;
public void RasterPictureBox_FrameChanged()
{
MyForm2 form = new MyForm2();
form.ShowDialog();
}
class MyForm2 : Form
{
RasterPictureBox thePictureBox;
public MyForm2()
{
// Create the raster PictureBox
thePictureBox = new RasterPictureBox();
thePictureBox.Dock = DockStyle.Fill;
thePictureBox.BorderStyle = BorderStyle.Fixed3D;
thePictureBox.UseDpi = false;
// Set the paint properties
RasterPaintProperties p = new RasterPaintProperties();
p.PaintDisplayMode = RasterPaintDisplayModeFlags.Bicubic;
p.PaintEngine = RasterPaintEngine.GdiPlus;
p.UsePaintPalette = true;
thePictureBox.PaintProperties = p;
Controls.Add(thePictureBox);
thePictureBox.BringToFront();
// load an image into the viewer
RasterCodecs codecs = new RasterCodecs();
thePictureBox.Image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "eye.gif"));
codecs.Dispose();
thePictureBox.FrameChanged += new EventHandler<RasterPictureBoxFrameChangedEventArgs>(thePictureBox_FrameChanged);
}
void thePictureBox_FrameChanged(object sender, RasterPictureBoxFrameChangedEventArgs e)
{
Text = string.Format("Playing Frame({0})", e.Index);
}
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document
Your email has been sent to support! Someone should be in touch! If your matter is urgent please come back into chat.
Chat Hours:
Monday - Friday, 8:30am to 6pm ET
Thank you for your feedback!
Please fill out the form again to start a new chat.
All agents are currently offline.
Chat Hours:
Monday - Friday
8:30AM - 6PM EST
To contact us please fill out this form and we will contact you via email.