Products | Support | Email a link to this topic. | Send comments on this topic. | Back to Introduction - All Topics | Help Version 19.0.5.2
|
Leadtools.Annotations Namespace : AnnAudioObject Class |
[SerializableAttribute()] public class AnnAudioObject : AnnImageObject, IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Declaration <SerializableAttribute()> Public Class AnnAudioObject Inherits AnnImageObject Implements IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
'Usage Dim instance As AnnAudioObject
[SerializableAttribute()] public ref class AnnAudioObject : public AnnImageObject, IAnnPictureObject, System.ICloneable, System.IDisposable, System.Runtime.Serialization.ISerializable
The AnnAudioObject class inherits the AnnImageObject class and accesses the common AnnImageObject.Picture property mentioned above through this inheritance.
For more information about the audio annotation object refer to AnnAudioObject. For more information about the automated annotation audio object, refer to Annotation Objects - Automated Features and Automated Annotations - Audio Tab.
This example creates a new audio object at location 100, 200 and with dimensions of 400 x 600 and then adds it to a container.
Imports Leadtools Imports Leadtools.Annotations Imports Leadtools.Codecs Imports Leadtools.WinForms Private Sub AnnAudioObject_AnnAudioObject(ByVal container As AnnContainer, ByVal waveFileName As String) Dim audio As AnnAudioObject = New AnnAudioObject() audio.Bounds = New AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel) audio.FileName = waveFileName container.Objects.Add(audio) ' play the audio to test it If (audio.CanPlay) Then audio.Play() End If End Sub
using Leadtools; using Leadtools.Annotations; using Leadtools.Codecs; using Leadtools.WinForms; private void AnnAudioObject_AnnAudioObject(AnnContainer container, string waveFileName) { AnnAudioObject audio = new AnnAudioObject(); audio.Bounds = new AnnRectangle(100, 200, 400, 600, AnnUnit.Pixel); audio.FileName = waveFileName; container.Objects.Add(audio); // play the audio to test it if((audio.CanPlay)) audio.Play(); }