LEADTOOLS Windows Forms (Leadtools.WinForms assembly)

AnimationModeChanged Event

Show in webframe
Example 





Occurs when the value of the AnimationMode property changes.
Syntax
public event EventHandler AnimationModeChanged
'Declaration
 
Public Event AnimationModeChanged As EventHandler
'Usage
 
Dim instance As RasterPictureBox
Dim handler As EventHandler
 
AddHandler instance.AnimationModeChanged, handler

            

            
public:
event EventHandler^ AnimationModeChanged
Remarks
This event is raised if the AnimationMode property is changed by either a programmatic modification or user interaction.
Example
Copy Code  
Imports Leadtools.WinForms
Imports Leadtools
Imports Leadtools.Codecs
Imports Leadtools.Drawing

Private Sub viewer_AnimationModeChanged(ByVal sender As Object, ByVal e As EventArgs)
    Dim viewer As RasterPictureBox = CType(IIf(TypeOf sender Is RasterPictureBox, sender, Nothing), RasterPictureBox)
    Dim s As String = String.Format("AnimationModeChanged Event: {0}", viewer.AnimationMode.ToString())
    MessageBox.Show(s)
End Sub
Public Sub RasterPictureBox_AnimationModeChanged(ByVal viewer As RasterPictureBox)
    AddHandler viewer.AnimationModeChanged, AddressOf viewer_AnimationModeChanged

    Select Case viewer.AnimationMode
        Case RasterPictureBoxAnimationMode.Infinite
            viewer.AnimationMode = RasterPictureBoxAnimationMode.UseImageGlobalLoop

        Case RasterPictureBoxAnimationMode.UseImageGlobalLoop
            viewer.AnimationMode = RasterPictureBoxAnimationMode.Infinite
    End Select

    viewer.PlayAnimation()
    RemoveHandler viewer.AnimationModeChanged, AddressOf viewer_AnimationModeChanged
End Sub
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
using Leadtools.Drawing;

private void viewer_AnimationModeChanged(object sender, EventArgs e)
{
   RasterPictureBox viewer = sender as RasterPictureBox;
   string s = string.Format("AnimationModeChanged Event: {0}", viewer.AnimationMode.ToString());
   MessageBox.Show(s);
}
public void RasterPictureBox_AnimationModeChanged(RasterPictureBox viewer)
{
   viewer.AnimationModeChanged += new EventHandler(viewer_AnimationModeChanged);

   switch (viewer.AnimationMode)
   {
      case RasterPictureBoxAnimationMode.Infinite:
         viewer.AnimationMode = RasterPictureBoxAnimationMode.UseImageGlobalLoop;
         break;

      case RasterPictureBoxAnimationMode.UseImageGlobalLoop:
         viewer.AnimationMode = RasterPictureBoxAnimationMode.Infinite;
         break;
   }

   viewer.PlayAnimation();
   viewer.AnimationModeChanged-= new EventHandler(viewer_AnimationModeChanged);
}
Requirements

Target Platforms

See Also

Reference

RasterPictureBox Class
RasterPictureBox Members

 

 


Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.