Skip to content

Latest commit

 

History

History
99 lines (60 loc) · 2.2 KB

theme-opendialog.md

File metadata and controls

99 lines (60 loc) · 2.2 KB
title description ms.assetid keywords topic_type api_name api_type ms.topic ms.date api_location ms.custom
THEME.openDialog
The openDialog method opens a file dialog box.
d7f4549c-a5c3-4902-b13b-51f3d4444ea9
THEME.openDialog Windows Media Player
apiref
THEME.openDialog
NA
reference
4/26/2023
UpdateFrequency5

THEME.openDialog

[The feature associated with this page, Windows Media Player SDK, is a legacy feature. It has been superseded by MediaPlayer. MediaPlayer has been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer instead of Windows Media Player SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The openDialog method opens a file dialog box.

        theme.openDialog(dialogType, parameters)

Parameters

dialogType

A String that specifies the type of dialog box. Must be set to "FILE_OPEN".

parameters

A String that can be used for additional information. Must be set to "FILES_ALLMEDIA".

Return Value

This method returns a String containing the URL of the selected file or "" (empty string) if the user clicks cancel.

Remarks

This method can be used for files on the local hard drives or on network drives.

Examples

<THEME>
  <VIEW id="View1" 
    backgroundImage="greenstone.bmp" 
    width=500 height=300 author="Microsoft Corp.">
    <BUTTON 
      id="Open" 
      image="Open.png" 
      onclick="jscript:
        player.URL = theme.openDialog('FILE_OPEN','FILES_ALLMEDIA')">
    </BUTTON>
  </VIEW>
</THEME>

Requirements

Requirement Value
Version
Windows Media Player version 7.0 or later

See also

THEME Element