MSPropShell.RemoveAllPages

Windows Media Encoder SDK banner art

The RemoveAllPages method removes all of the property pages from the MSPropShell control.

Syntax

MSPropShell.RemoveAllPages

Parameters

This method takes no parameters.

Return Values

This method does not return a value.

Remarks

Use this method to delete or reorder property pages. When all of the pages have been deleted, reorder them by calling MSPropShell.AddPage multiple times in the correct sequence. To avoid automatically refreshing after every page is added, set MSPropShell.AutoRefresh to False.

Example Code

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

' Create the Windows Media Encoder property pages.
Dim PpgSources As New WMEncSourcesPage
Dim PpgDesc As New WMEncDisplayInfoPage
Dim PpgAttr As New WMEncAttributesPage
Dim PpgProfile As New WMEncProfilePage
Dim PpgOutput As New WMEncOutputPage

' Add Windows Media Encoder to the property page shell.
' You must add the encoder before adding the property pages.
PropPageShell.AddObject Encoder

' Add the property pages to the property page shell. To create an
' MSPropShell ActiveX control, on the Project menu, click Components,
' and then in the Components dialog box, select Microsoft PropShell
' Control 1.0. In the following example, the ActiveX control is named
' PropPageShell.
PropPageShell.AddPage PpgSources
PropPageShell.AddPage PpgDesc
PropPageShell.AddPage PpgAttr
PropPageShell.AddPage PpgProfile
PropPageShell.AddPage PpgOutput

' Reorder the pages. Call RemoveAllPages to remove all
' property pages from the MSPropShell control.
PropPageShell.RemoveAllPages

' Set the AutoRefresh property to False so that the
' MSPropShell control is not refreshed when each new page is added.
PropPageShell.AutoRefresh = False

' Add the property pages in the desired order.
PropPageShell.AddPage PpgOutput
PropPageShell.AddPage PpgAttr
PropPageShell.AddPage PpgProfile
PropPageShell.AddPage PpgSources
PropPageShell.AddPage PpgDesc

' Refresh the MSPropShell ActiveX control.
PropPageShell.Refresh

Requirements

Reference: Microsoft PropShell Control 1.0

Library: mspshell.dll

See Also