Movie Maker Timeline Control

AddEffectClip Method

Description

Add an effect to the timeline.

Syntax

Public Function AddEffectClip ( _
   ByVal trackIndex as integer, _
   ByVal name as string, _
   ByVal StartTime as float, _
   ByVal StopTime as float, _
   ByVal params as string
) 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 name of effect. You may use GetDESEffect method to get all effects installed on your system.

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

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

params
    The parameter of the effect. Some effect can set the parameter.

e.g.
BasicImage  -  GrayScale=1,Invert=0,Mirror=0,Rotation=0,XRay=0

set GrayScale =1, it mean enable grayscale effect, if set Invert = 1, enable invert effect. Otherwise disable invert effect.

Blur - PixelRadius=10.0
Emboss - Bias=0.7
Engrave - Bias=1.0
MotionBlur - Direction=90,Strength=5
Pixelate - MaxSquare=20,Percent=25
Wave - Freq=3,LightStrength=15,Phase=75,Strength=50
Microsoft Movie Maker Age Filter - Age=50
Shadow - direction=50,color=#0000FF,strength=20
Chroma - color=FFFFFF"

Return Value

Return value is the clip index of the newly added clip if successful.
Return -1 , the name of effect is empty.
Return -3 , the StartTime >= StopTime.
Return -4 , the track not found.
Return -5 , the unknown error.
 

Example

Visual Basic Syntax
iCurrentVideoClipIndex= TimelineControl1.AddVideoClip(1, "c:\temp\yourvideo.mpg", 0, 30, 0)
iCurrentEffectClipIndex= TimelineControl1.AddEffect(4, "BasicImage", 0, 30, "GrayScale=0,Invert=1,Mirror=1,Rotation=0,XRay=0")