MSPropShell.InitNew

Windows Media Encoder SDK banner art

The InitNew property specifies and retrieves a Boolean value indicating whether the property pages hosted by the MSPropShell control must be reinitialized to an empty state.

Syntax

MSPropShell.InitNew = Boolean
Boolean = MSPropShell.InitNew

Parameters

This property takes no parameters.

Property Value

A Boolean that indicates whether the property pages must be reinitialized.

Remarks

The InitNew property defaults to False. Property pages usually display the configuration of the WMEncoder object attached to them. However, you can set the InitNew property to True to ignore the current configuration and display empty pages.

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

' When the end user has finished using the property pages to
' configure the encoding session and has clicked the Apply button,
' apply the configuration programmatically.
PropPageShell.Apply

' Reinitialize the property pages to prepare them for a new configuration.
PropPageShell.InitNew = True

Requirements

Reference: Microsoft PropShell Control 1.0

Library: mspshell.dll

See Also