Windows Media Player SDK banner art
PreviousNext

Creating an HTML Application

This topic applies to Windows Media Player version 6.4 only.

The file begins like an ordinary HTML file, but includes an in-line script and an HTA:APPLICATION tag, as shown below.

<HTML>
<HEAD>
    <SCRIPT>
        window.resizeTo(330,448);
    </SCRIPT>

    <TITLE>Media Player Faceplate</TITLE>

    <HTA:APPLICATION 
        CAPTION="true"
        MAXIMIZEBUTTON="no"
    >
</HEAD>

The one-line script within the SCRIPT tags resizes the window to the dimensions of Windows Media Player and its title area. This step is necessary because otherwise the window dimensions would use whatever default values were defined previously for Microsoft® Internet Explorer, which probably are not the desired dimensions.

The HTA:APPLICATION tag was introduced with Microsoft® Internet Explorer 5 to be used with the HTA file type. With this tag you can specify properties of the HTML application and the browser window it shows to users. It must be located inside the HEAD tag of any HTA file. Setting the CAPTION attribute to true produces the top menu bar, enabling users to reposition and close the browser window. Setting the MAXIMIZEBUTTON attribute to no disables the Maximize button on the menu bar. This prevents users from filling their entire screen with the much smaller faceplate. There is a Minimize button on the menu bar by default; it can be disabled by setting the MINIMIZEBUTTON attribute to no.

PreviousNext


© 2000-2001 Microsoft Corporation. All rights reserved.