Movie Maker Timeline Control

AddImageClip Method

Description

Add an image to the timeline.

Syntax

Public Function AddImageClip ( _
   ByVal trackIndex as integer, _
   ByVal filename as string, _
   ByVal clipStartTime as float, _
   ByVal clipStopTime as float
 ) As Integer

 

Parameter

trackIndex
   0 - Transition Track
   1 - Video 1 Track
   2 - Video 2 Track
   3 - Image Track
   4 - Effect Track
   5 - Audio 1 Track
   6 - Audio 2 Track
   7 - Text Track

filename
    the path of image file

clipStartTime
    Time in seconds when the clip will start on the timeline

clipStopTime
    Time in seconds when the clip will end on the timeline.

Return Value

Return value is the clip index of the newly added clip if successful.
Return -1 , the path of image file is empty.
Return -2 , the path of image file not found.
Return -3 , the clipStartTime >= clipStopTime.
Return -4 , the track not found.
Return -5 , the unknown error.
 

Example

Visual Basic Syntax
iCurrentClipIndex= TimelineControl1.AddImageClip(3, "c:\temp\yourimage.jpg", 0, 30)