Home > Microsoft .Net Development Tips > Microsoft Office Development > Use Windows Media Player in .NET
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

MICROSOFT OFFICE DEVELOPMENT

Use Windows Media Player in .NET


Shawn Wildermuth
12.16.2003
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


The short attention span of television watchers is as important to your applications as it is to the TV networks, with multimedia applications becoming more the rule than the exception. Users increasingly expect slick, media-rich applications. So how do you jump on the media train without becoming an expert in codecs, streaming, and compression technologies? This tip, excerpted from InformIT, will get you started.

The short attention span of television watchers is as important to your applications as it is to the TV networks, with multimedia applications becoming more the rule than the exception. Users increasingly expect slick, media-rich applications. So how do you jump on the media train without becoming an expert in codecs, streaming, and compression technologies? Well, let me show you.

To get started, you need Windows Media Player 9.0 installed on your development machine. You also need the Windows Media Player SDK.

Be sure to get the Windows Media Player SDK, not the Windows Media Services SDK; they're very different beasts.

After you download the SDK, install it anywhere that's convenient. The SDK installs a couple of interesting features:

Now that the stage is set, let's create your first media-savvy application.

We'll start with a blank Windows application project an


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
ASP.NET Development
How to use jQuery to solve Javascript browser compatibility problems
How to write an out-of-browser Silverlight 3 application in 3 steps
Silverlight 3 beta SDK download lets developers try new RIA features
Visual Studio's IntelliSense for jQuery doesn't autocomplete correctly
Dundas Map for .NET kicks up geographic visualization
Return to CodePlex: Into the Sandcastle…
VBScript Tutorial
Use PHP with Visual Studio to create Web sites
Visual Studio Team System Add-ins: Conchango Scrum for Team System and Scrum Dashboard
Visual Studio 2008 and .NET Framework 3.5 SP1 introduces ADO .NET Entity Designer

Microsoft Office Development
Downloadable MSDN library released for VS 2008 SP 1
Check the MSDN Virtual Labs for regular, compelling new content
Windows XP SP3 pack includes new XML parser, enhanced IP security
Book excerpt: Building personalized solutions in SharePoint 2007
Book excerpt: Building document management solutions in SharePoint 2007
XAML as an everywhere presentation format
Where are the Visual Studio 2008 Tools for Office?
ClickOnce: Automated smart client deployment
Book excerpt: SharePoint 2007 and content types
Update desktops automatically using the AppUpdater component

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary


d drop the Windows Media Player control on the form. The Windows Media Player control should be in the Windows Forms section of the toolbox. If it isn't there, right-click the toolbox and select Add/Remove Items. In the Customize Toolbox dialog box, click the COM Components tab, scroll down to the end of the list, and select the control to add it to the toolbox.

Now that the control is available, drag it onto the form so you can get started working with it. When you add the control to the form, AxWMPLib (the control) and WMPLib (the core library) are added as references. Both are required.

Not surprisingly, the control looks like the guts of the Windows Media Player.

For a simple example, let's play an arbitrary media file in the form's Load event. To add a handler for this event, double-click the form's title bar. In the handler, write a single line to play the file:

Setting the URL property causes the control to load and play the selected file or URL.

A complete reference to the control and all its methods, events, and properties is available on MSDN.


To read the entire article from which this tip comes, click over to InformIT. No registration required. You don't give any of your information; you just get lots of good info from the site.


Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.



Database Programming Solutions - .NET XML, Visual Studio LINQ, ORM .NET
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2000 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts