Visual Basic-based Sample Applications

This article describes the Microsoft® Visual Basic® version 5.x samples in the Microsoft® DirectX® Media Software Development Kit (SDK).

This article contains the following sections.

Visual Basic-based ActiveX Player

This ActiveX sample, Ocxvb01, demonstrates an application that uses the Microsoft® ActiveMovie™ capability of the Microsoft® Windows Media™ Player control. (The Windows Media Player control is backward compatible.) It has a form that contains menus and controls to demonstrate the access of various properties of the video control.

The sample has a menu command that enables you to create the control by opening a video file from the File menu, and to use Run, Pause, and Stop commands to programmatically control the Windows Media Player control in ActiveMovie mode. All of the ActiveMovie Control Panel features, such as selection controls, position controls, and the trackbar control, can be made visible selectively, and enabled or disabled from menu commands in the sample application. Other properties, such as the rate and current position, can also be changed from the application, and you can set the image in the video control to various sizes such as half, default, double, and full-screen.

Sample Locations

Visual Basic-based Filter Graph Builder

The filter graph builder sample, Builder, demonstrates how a Visual Basic-based application uses the collection interfaces that the filter graph manager exposes to build and connect a custom filter graph. The collection interfaces are composed of the following interfaces.

These interfaces appear as objects in the Windows Media Player control type library in the Visual Basic development environment and enable the registry to be searched, filters to be added, and pins to be connected, among other things. See Constructing Filter Graphs Using Visual Basic for a detailed description of this sample.

The Builder sample presents a form that enables the user to see a list of filters in the registry and add filters to the filter graph. It also enables the user to examine the names and properties of pins on the filter, the media types on the pins, and to connect the pins. The sample has an additional sample routine, accessed by a menu, that automatically builds a filter graph. The filter graph is built using the collection interface objects, to better demonstrate the more typical use of these objects in a Visual Basic-based application. The sample also enables you run the constructed filter graph.

Sample Locations

Visual Basic-based Filter Graph Player

The filter graph player, VBDemo, demonstrates how to use the DirectShow Visual Basic objects that control the playback of video and that adjust properties of various components. See Controlling Filter Graphs Using Visual Basic for a detailed description of this sample.

The VBDemo sample enables you to open a video file. Use the Play, Pause, and Stop buttons to control the video. It positions the video window as a child window of the main form and displays the movie's length and elapsed time. It also enables you to set the start position and rate. Use two sliders to adjust the audio renderer's volume and balance.

Sample Locations

Visual Basic-based Player

The sample player, Player, is a short Visual Basic-based program that demonstrates the minimum requirements for playing back a DirectShow media file without using the Windows Media Player control. It uses the same DirectShow object library as the VBDemo sample, but provides only three buttons (Open, Play, and Stop) and a slider for indicating position.

Sample Locations


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.