IWMEncSourceGroupCollection.Move

Windows Media Encoder SDK banner art

The Move method repositions a given source group directly in front of another source group in the collection.

Syntax

IWMEncSourceGroupCollection.Move(SourceGroup, SourceGroupInfront)

Parameters

SourceGroup

[in]  Repositioned IWMEncSourceGroup object.

SourceGroupInfront

[in]  IWMEncSourceGroup object before which SourceGroup is placed.

Return Values

This method does not return a value.

Remarks

Use the IWMEncSourceGroupCollection.Add method to add a source group. Use the IWMEncSourceGroupCollection.Item method to retrieve both SourceGroup and SourceGroupInfront.

Example Code

' Create a WMEncoder object.
Dim Encoder As WMEncoder
Set Encoder = New WMEncoder

' Declare objects and variables.
Dim SrcGrpColl As IWMEncSourceGroupCollection
Dim SrcGrp As IWMEncSourceGroup
Dim SrcGrp1 As IWMEncSourceGroup
Dim SrcGrp2 As IWMEncSourceGroup
Dim SrcGrp3 As IWMEncSourceGroup
Dim i As Integer

' Create an IWMEncSourceGroupCollection object.
Set SrcGrpColl = Encoder.SourceGroupCollection

' Add new source groups to the collection.
Set SrcGrp1 = SrcGrpColl.Add("SG_1")
Set SrcGrp2 = SrcGrpColl.Add("SG_2")
Set SrcGrp3 = SrcGrpColl.Add("SG_3")

' Loop through the collection to find a specific
' source group.
For i = 0 To SrcGrpColl.Count - 1
    Set SrcGrp = SrcGrpColl.Item(i)
    If SrcGrp.Name = "SG_3" Then
        ' Move SrcGrp3 in front of SrcGrp1.
        SrcGrpColl.Move SrcGrp3, SrcGrp1
        ' Make ScrGrp3 active.
        SrcGrpColl.Active = SrcGrp3
    End If
Next
   
' Remove SrcGrp2, by index, from the collection.
SrcGrpColl.Remove 2

Requirements

Reference: Windows Media Encoder

Library: wmenc.exe

See Also