Example Code

Launch Video in Modal Dialog Using LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview
This example demonstrates how to launch a window which loads and plays a video, then automatically closes

Description
The example uses ActiveX to load a video through a web browser via an html page with the video embedded. First, the HTML file is modified to reflect the specified media file. The URL is then launched in the ActiveX container (note that the wmp.html file must be in the same directory as the VI). The Document Object Model (DOM) is accessed to programmatically control the webpage, which controls Windows Media Player; front panel clicks are then translated into webpage button clicks. Finally, all ActiveX references are closed.
Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

 

1.Run Main Window Caller.vi

Additional Information or References
VI Block Diagram

 1.png

 

 

 

 

 **This document has been updated to meet the current required format for the NI Code Exchange.**

 

 

Al B.
Staff Software Engineer - TestStand
CTA/CLD

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.